From dcc7393b3b300b053c732d73c1951b5ef27f031c Mon Sep 17 00:00:00 2001 From: yyh Date: Wed, 3 Dec 2025 16:55:08 +0800 Subject: [PATCH] Fix marketplace list reset on clear when no collections --- .../plugins/marketplace/list/list-wrapper.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/web/app/components/plugins/marketplace/list/list-wrapper.tsx b/web/app/components/plugins/marketplace/list/list-wrapper.tsx index fa6521bcfd..908c9c4406 100644 --- a/web/app/components/plugins/marketplace/list/list-wrapper.tsx +++ b/web/app/components/plugins/marketplace/list/list-wrapper.tsx @@ -28,13 +28,20 @@ const ListWrapper = ({ const isLoading = useMarketplaceContext(v => v.isLoading) const isSuccessCollections = useMarketplaceContext(v => v.isSuccessCollections) const handleQueryPlugins = useMarketplaceContext(v => v.handleQueryPlugins) + const searchPluginText = useMarketplaceContext(v => v.searchPluginText) + const filterPluginTags = useMarketplaceContext(v => v.filterPluginTags) const page = useMarketplaceContext(v => v.page) const handleMoreClick = useMarketplaceContext(v => v.handleMoreClick) useEffect(() => { - if (!marketplaceCollectionsFromClient?.length && isSuccessCollections) + if ( + !marketplaceCollectionsFromClient?.length + && isSuccessCollections + && !searchPluginText + && !filterPluginTags.length + ) handleQueryPlugins() - }, [handleQueryPlugins, marketplaceCollections, marketplaceCollectionsFromClient, isSuccessCollections]) + }, [handleQueryPlugins, marketplaceCollections, marketplaceCollectionsFromClient, isSuccessCollections, searchPluginText, filterPluginTags]) return (