@@ -41,13 +41,9 @@ const PluginListContainer = ({
41
41
42
42
const [ pluginList , setPluginList ] = useState < PluginListItemType [ ] > ( parentPluginList || [ ] )
43
43
const [ totalCount , setTotalCount ] = useState < number > ( parentTotalCount || 0 )
44
- // TODO: Maybe structuredClone is not required
45
44
const [ filters , setFilters ] = useState < PluginListFiltersType > (
46
45
parentFilters || structuredClone ( DEFAULT_PLUGIN_LIST_FILTERS ) ,
47
46
)
48
- // Have to make a state to trigger clear filters, since filters are not on URL
49
- // TODO: Ask should it be number since in case of large state it can be a problem
50
- const [ clearSearchTrigger , setClearSearchTrigger ] = useState < boolean > ( false )
51
47
52
48
const handlePluginListUpdate = ( updatedPluginList : PluginListItemType [ ] ) => {
53
49
setPluginList ( updatedPluginList )
@@ -158,7 +154,6 @@ const PluginListContainer = ({
158
154
selectedTags : [ ] ,
159
155
} )
160
156
161
- setClearSearchTrigger ( ( prev ) => ! prev )
162
157
handlePersistFiltersChange ( )
163
158
}
164
159
@@ -198,7 +193,7 @@ const PluginListContainer = ({
198
193
{ /* Filters section */ }
199
194
< div className = "w-100 flexbox dc__gap-12 py-12 dc__position-sticky dc__top-0 bcn-0 dc__zi-1 flex-wrap" >
200
195
< SearchBar
201
- key = { `search-bar-key- ${ Number ( clearSearchTrigger ) } ` }
196
+ initialSearchText = { searchKey }
202
197
containerClassName = "flex-grow-1"
203
198
handleEnter = { handleSearch }
204
199
inputProps = { {
0 commit comments