Skip to content

Commit

Permalink
Clear cache on list refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
apedroferreira committed Feb 21, 2025
1 parent d586f8a commit 92a4e8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/toolpad-core/src/Crud/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,10 @@ function List<D extends DataModel>(props: ListProps<D>) {

const handleRefresh = React.useCallback(() => {
if (!isLoading) {
cache?.clear();
loadData();
}
}, [isLoading, loadData]);
}, [cache, isLoading, loadData]);

const handleRowClick = React.useCallback<GridEventListener<'rowClick'>>(
({ row }) => {
Expand Down

0 comments on commit 92a4e8a

Please sign in to comment.