From 92a4e8ae320a1d64b1b30d3a09d121c936010181 Mon Sep 17 00:00:00 2001 From: Pedro Ferreira <10789765+apedroferreira@users.noreply.github.com> Date: Fri, 21 Feb 2025 14:02:39 +0000 Subject: [PATCH] Clear cache on list refresh --- packages/toolpad-core/src/Crud/List.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/toolpad-core/src/Crud/List.tsx b/packages/toolpad-core/src/Crud/List.tsx index 597ecb39c81..13f38c9f641 100644 --- a/packages/toolpad-core/src/Crud/List.tsx +++ b/packages/toolpad-core/src/Crud/List.tsx @@ -254,9 +254,10 @@ function List(props: ListProps) { const handleRefresh = React.useCallback(() => { if (!isLoading) { + cache?.clear(); loadData(); } - }, [isLoading, loadData]); + }, [cache, isLoading, loadData]); const handleRowClick = React.useCallback>( ({ row }) => {