fmoo/react-typeahead

props.disable is a breaking change in 1.1.7

nosilleg opened this issue · 4 comments

Previously we were passing in disabled to props.inputProps, but with the change in 1.1.7 this is now overwritten by props.disable which we are not passing in (because it didn't exist in prior releases.)

As such, our previously disabled inputs are no longer disabled.

See 478dbfc#diff-f431d994af3ed5b8d4a8628b2978088aR316

There are at least 3 solutions to this:

  1. Everyone updates to use the new prop.
  2. The new prop is removed because it was redundant anyway as it could be specified in props.inputProps.
  3. The new disable prop can be set on <InputElement before the spread is done on props.inputProps, so that inputProps takes priority.

Thoughts?

fmoo commented

Not a fan of 1 on a release revision.

If we go with 2, it's arguable we should clean up all the redundant methods (onKeyUp, onKeyDown, etc), but this isn't a release revision change either. We should probably update the docs so people stop submitting this type of change.

3 makes the most sense in the short-term, I think. I'll merge in and cut a release ASAP if you put a PR up.

Sounds good.

At a computer now. Have created the PR #175

Note that this is a distinct issue from 'disabled' vs 'disable'