Fixes #11038 # Fix useFindManyRecords withSoftDeleterFilter The error came from a faulty implementation of the `withSoftDeleted` parameter inside `useFindManyRecords` and from the fact that `withSoftDeleted: true` was added to access deleted records actions. However, this parameter was always set in `useFindManyRecordsSelectedInContextStore` instead of considering whether the filter was active or not. ``` const withSoftDeleterFilter = { or: [{ deletedAt: { is: 'NULL' } }, { deletedAt: { is: 'NOT_NULL' } }], }; ``` The final filter was incorrectly doing an `or` operation between the base filter and `withSoftDeleterFilter` when it should have been an `and`: ``` filter: { ...filter, ...(withSoftDeleted ? withSoftDeleterFilter : {}), } ``` The correct implementation should be: ``` filter: filter || withSoftDeleted ? { and: [ ...(filter ? [filter] : []), ...(withSoftDeleted ? [withSoftDeleterFilter] : []), ], } : undefined, ``` # Fix useFindManyRecordsSelectedInContextStore - Check if the soft deleted filter is active before using the `withSoftDeleterFilter` parameter
Run yarn dev while server running on port 3000