1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-23 00:22:19 +01:00

fix: search clear bug

This commit is contained in:
Tymoteusz Czech 2022-06-14 11:48:49 +02:00
parent b1d9437d99
commit ee2d852ef2
2 changed files with 7 additions and 9 deletions

View File

@ -271,14 +271,12 @@ export const ArchiveTable = ({
: data.length : data.length
})`} })`}
actions={ actions={
<> <Search
<Search initialValue={searchValue}
initialValue={searchValue} onChange={setSearchValue}
onChange={setSearchValue} hasFilters
hasFilters getSearchContext={getSearchContext}
getSearchContext={getSearchContext} />
/>
</>
} }
/> />
} }

View File

@ -93,7 +93,7 @@ export const Search = ({
<IconButton <IconButton
size="small" size="small"
onClick={() => { onClick={() => {
onChange(''); onSearchChange('');
ref.current?.focus(); ref.current?.focus();
}} }}
> >