Skip to content

Commit

Permalink
fix: search not working as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmahidalgo committed Dec 8, 2023
1 parent 4374029 commit 15373c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webapp/src/components/AssetTopbar/AssetTopbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ export const AssetTopbar = ({
text => {
if (shouldRenderSearchDropdown) {
setSearchValueForDropdown(text)
} else if (text) {
// common search, when the dropdown is not opened
} else if (text && text !== search) {
// common search, when the dropdown is not opened and the input is different than the current search term
onBrowse({
search: text,
section: category ? getSectionFromCategory(category) : section
})
}
},
[category, onBrowse, section, shouldRenderSearchDropdown]
[category, onBrowse, search, section, shouldRenderSearchDropdown]
)
const [searchValue, setSearchValue] = useInput(search, handleInputChange, 500)

Expand Down

0 comments on commit 15373c8

Please sign in to comment.