Fix optimistic effect for implicit and filters (#9935)
The optimistic effect for record creations and updates wasn't working properly for `and filters` without explicit `and`. The problem was located inside `isRecordMatchingFilter` which didn't consider implicit `and filters` as `and filters`. This caused queries to be updated by the optimistic effect even if they didn't match the root query filter. I also removed `fetchPolicy: 'cache-and-network'` from a query. This was a temporary fix for this issue. Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@ -53,7 +53,6 @@ export const useFindManyRecordsSelectedInContextStore = ({
|
||||
contextStoreTargetedRecordsRule.mode === 'selection' &&
|
||||
contextStoreTargetedRecordsRule.selectedRecordIds.length === 0,
|
||||
limit,
|
||||
fetchPolicy: 'cache-and-network',
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user