parent
c986bc178c
commit
45a2fc2b47
2 changed files with 9 additions and 2 deletions
|
@ -121,6 +121,13 @@ const List: React.FC<TopicsListProps> = ({
|
|||
closeConfirmationModal();
|
||||
clearSelectedTopics();
|
||||
}, [clusterName, selectedTopics]);
|
||||
const searchHandler = React.useCallback(
|
||||
(searchString: string) => {
|
||||
setTopicsSearch(searchString);
|
||||
history.push(`${pathname}?page=1&perPage=${perPage || PER_PAGE}`);
|
||||
},
|
||||
[search, pathname, perPage]
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="section">
|
||||
|
@ -142,7 +149,7 @@ const List: React.FC<TopicsListProps> = ({
|
|||
</div>
|
||||
<div className="column">
|
||||
<Search
|
||||
handleSearch={setTopicsSearch}
|
||||
handleSearch={searchHandler}
|
||||
placeholder="Search by Topic Name"
|
||||
value={search}
|
||||
/>
|
||||
|
|
|
@ -111,7 +111,7 @@ exports[`List when it does not have readonly flag matches the snapshot 1`] = `
|
|||
className="column"
|
||||
>
|
||||
<Search
|
||||
handleSearch={[MockFunction]}
|
||||
handleSearch={[Function]}
|
||||
placeholder="Search by Topic Name"
|
||||
value=""
|
||||
>
|
||||
|
|
Loading…
Add table
Reference in a new issue