From 1c3ce5338b1b06b11ffdf446a7d34c53a32de03a Mon Sep 17 00:00:00 2001 From: gearnode Date: Wed, 12 Feb 2025 14:45:33 -0800 Subject: [PATCH] Fix content not updated when mutation succeed Signed-off-by: gearnode --- apps/console/src/pages/VendorListPage.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/console/src/pages/VendorListPage.tsx b/apps/console/src/pages/VendorListPage.tsx index b9c87fb5c..39ce4eaa9 100644 --- a/apps/console/src/pages/VendorListPage.tsx +++ b/apps/console/src/pages/VendorListPage.tsx @@ -80,9 +80,11 @@ const vendorsList = [ function VendorListContent({ queryRef, onPageChange, + loadQuery }: { queryRef: PreloadedQuery; onPageChange: (params: { first?: number; after?: string; last?: number; before?: string }) => void; + loadQuery: (params: any) => void; }) { const data = usePreloadedQuery(vendorListPageQuery, queryRef); const [searchParams, setSearchParams] = useSearchParams(); @@ -180,6 +182,12 @@ function VendorListContent({ onCompleted(response: any) { setSearchTerm(""); setFilteredVendors([]); + loadQuery({ + first: ITEMS_PER_PAGE, + after: undefined, + last: undefined, + before: undefined, + }, { fetchPolicy: 'network-only' }); }, }); }} @@ -309,7 +317,11 @@ export default function VendorListPage() { Vendors - Probo Console }> - + );