react-select
react-select copied to clipboard
Pressing the Tab key(9), if allow create is true, this.selectFocusedOption() should be called
While the user press the Tab key (9), and allowCreate is true, and the user just typed a new value into the input, this input should not be cleared.
Current code (handleKeyDown):
case 9: // tab
if (event.shiftKey || !this.state.isOpen || !this.state.focusedOption) {
return;
}
this.selectFocusedOption();
break;
Should be changed to
`
case 9: // tab
if (event.shiftKey || !this.state.isOpen || (!this.props.allowCreate && !this.state.focusedOption) {
return;
}
this.selectFocusedOption();
break;
`
Hello -
In an effort to sustain the react-select project going forward, we're closing old issues / pull requests.
We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our limited efforts to maintain the latest version.
If you feel this issue / pull request is still relevant and you'd like us to review it, please leave a comment and we'll do our best to get back to you.