fix: only navigate to last tag on backspace if input is empty
This commit is contained in:
@@ -100,7 +100,7 @@ export const AutocompleteTagInput: FunctionalComponent<Props> = ({
|
||||
onBlur={closeOnBlur}
|
||||
onFocus={showDropdown}
|
||||
onKeyUp={(event) => {
|
||||
if (event.key === 'Backspace') {
|
||||
if (event.key === 'Backspace' && searchQuery === '') {
|
||||
lastTagRef.current?.focus();
|
||||
}
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user