Skip to content

delete key is not affecting input text #122

@esstengolebanidze

Description

@esstengolebanidze

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions