-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
The onInputChange() handler does not return the modified value. I've included a plunker to demonstrate the issue.
The issue is that this.props.onInputChange does not mutate input, thus this.inputValue is always input and the method always returns the unmodified input.
https://github.com/JedWatson/react-select/blob/master/src/Creatable.js#L172
onInputChange (input) {
const { onInputChange } = this.props;
if (onInputChange) {
onInputChange(input);
}
// This value may be needed in between Select mounts (when this.select is null)
this.inputValue = input;
},
It appears that there a couple of related issues and PRs already open, but either they have not been reviewed or the submitter has not updated. I also don't think that the open PRs offer the best solution, nor solve it completely, so I felt it best to open a new issue and PR. Either way, we are trying to use this library in a project and would like to see this corrected as soon as possible.
Opened PR #2057