Skip to content

Commit

Permalink
add onReset to search input of table
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanMarcMilletScality committed Feb 28, 2024
1 parent df09312 commit 773327c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/lib/components/tablev2/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export function TableSearch(props: SearchProps) {
displayedName,
locale = 'en',
totalCount,
onReset,
...rest
} = props;
const { setGlobalFilter, rows, preGlobalFilteredRows } = useTableContext();
Expand All @@ -100,6 +101,7 @@ export function TableSearch(props: SearchProps) {
placeholder={translations[locale].search}
disableToggle
size="1"
onReset={onReset}
onChange={(evt) => {
if (typeof onChange === 'function') {
// @ts-ignore
Expand Down
1 change: 0 additions & 1 deletion src/lib/components/tablev2/SearchWithQueryParams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export function SearchWithQueryParams(props: SearchWithQueryParamsProps) {
value={value}
onReset={() => {
handleOnChange('');
params.delete(queryParams);
}}
{...rest}
/>
Expand Down

0 comments on commit 773327c

Please sign in to comment.