diff --git a/src/components/SearchBAN/search-input/SearchInput.tsx b/src/components/SearchBAN/search-input/SearchInput.tsx index 3c7609f98..8f972bb85 100644 --- a/src/components/SearchBAN/search-input/SearchInput.tsx +++ b/src/components/SearchBAN/search-input/SearchInput.tsx @@ -69,12 +69,14 @@ export default function SearchInput({ } case useCombobox.stateChangeTypes.ItemClick: case useCombobox.stateChangeTypes.InputKeyDownEnter: - onSelect(changes.selectedItem) + console.log('selectedItem', changes.selectedItem, actionAndChanges?.props?.items?.[0], actionAndChanges) + const selectedValue = changes.selectedItem || actionAndChanges?.props?.items?.[0] + onSelect(selectedValue) return { ...changes, - ...(changes.selectedItem + ...(selectedValue ? { - inputValue: changes.selectedItem.properties.name, + inputValue: selectedValue.properties.name, } : null), }