diff --git a/packages/ra-core/src/dataProvider/useGetMany.ts b/packages/ra-core/src/dataProvider/useGetMany.ts index 45a81d4f1d8..16f369a1264 100644 --- a/packages/ra-core/src/dataProvider/useGetMany.ts +++ b/packages/ra-core/src/dataProvider/useGetMany.ts @@ -189,6 +189,7 @@ const callQueries = debounce(() => { queries.forEach(({ ids, setState, onSuccess }) => { setState(prevState => ({ ...prevState, + error: null, loading: false, loaded: true, })); diff --git a/packages/ra-core/src/dataProvider/useQueryWithStore.ts b/packages/ra-core/src/dataProvider/useQueryWithStore.ts index edd1ea0c82b..8f5a06720dd 100644 --- a/packages/ra-core/src/dataProvider/useQueryWithStore.ts +++ b/packages/ra-core/src/dataProvider/useQueryWithStore.ts @@ -138,6 +138,7 @@ const useQueryWithStore = ( // will be empty, so it should not be used at all. setState(prevState => ({ ...prevState, + error: null, loading: false, loaded: true, }));