Skip to content

Commit

Permalink
[Autocomplete] delete multiple Chips with Escape Key
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiran committed Mar 11, 2020
1 parent 0f109d7 commit 639c067
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ export default function useAutocomplete(props) {
// Avoid the Modal to handle the event.
event.stopPropagation();
handleClose(event);
} else if (clearOnEscape && inputValue !== '') {
} else if (clearOnEscape && (inputValue !== '' || (multiple && value.length > 0))) {
// Avoid Opera to exit fullscreen mode.
event.preventDefault();
// Avoid the Modal to handle the event.
Expand Down

0 comments on commit 639c067

Please sign in to comment.