Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete key is not affecting input text #122

Open
esstengolebanidze opened this issue Sep 26, 2018 · 0 comments
Open

delete key is not affecting input text #122

esstengolebanidze opened this issue Sep 26, 2018 · 0 comments

Comments

@esstengolebanidze
Copy link

Hello,

I had an issue with dropdown when searching. Delete key was not affecting input text. I looked into code (Select.js; handleKeyDown function line: 475). There is switch statement to handle some keys including backspace and delete, I assume they should have similar logic but codewise there is a slight difference (maybe unintended).

For backspace - first happens check on (!this.state.inputValue && this.props.backspaceRemoves) and if it's true only then preventDefault and popValue are called (Line: 486)
For delete - no matter what preventDefault is called and then there's check on (!this.state.inputValue && this.props.deleteRemoves). (Line: 560). I assume preventDefault should be inside of if statement.

To reproduce: set 'searchable' to true; enter search text; try to delete symbols using delete key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant