diff --git a/src/apps/dashboard/routes/plugins/index.tsx b/src/apps/dashboard/routes/plugins/index.tsx index fdcc179633..ddad16117f 100644 --- a/src/apps/dashboard/routes/plugins/index.tsx +++ b/src/apps/dashboard/routes/plugins/index.tsx @@ -50,6 +50,11 @@ export const Component = () => { setSearchQuery(event.target.value); }, []); + const onViewAll = useCallback(() => { + if (category) setCategory(undefined); + else setStatus(PluginStatusOption.All); + }, [ category ]); + const filteredPlugins = useMemo(() => { if (pluginDetails) { let filtered = pluginDetails; @@ -207,12 +212,8 @@ export const Component = () => { ) : ( { - setCategory(undefined); - setStatus(PluginStatusOption.All); - }} + isFiltered={!!category || status !== PluginStatusOption.All} + onViewAll={onViewAll} query={searchQuery} /> )}