mirror of
https://github.com/maputnik/editor.git
synced 2026-02-12 07:30:00 +00:00
Fix dropdown closing behavior
This commit is contained in:
@@ -45,11 +45,13 @@ export default function InputAutocomplete({
|
||||
setInput(v)
|
||||
onChange(selectedItem ? selectedItem[0] : undefined)
|
||||
},
|
||||
onInputValueChange: ({inputValue: v}) => {
|
||||
onInputValueChange: ({inputValue: v, type}) => {
|
||||
if (typeof v === 'string') {
|
||||
setInput(v)
|
||||
onChange(v === '' ? undefined : v)
|
||||
openMenu()
|
||||
if (type === useCombobox.stateChangeTypes.InputChange) {
|
||||
openMenu()
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user