Refactor duplication of hard coded soft delete filter logic (#10058)

This PR adds a useCheckIsSoftDeleteFilter hook instead of the
undocumented in-place logic to retrieve the soft delete filter.

Also took the opportunity to refactor a recent change of @prastoin with
it.

Split VariantFilterChip into SoftDeleteFilterChip and RecordFilterChip
to separate concerns about this soft delete filtering.
This commit is contained in:
Lucas Bordeau
2025-02-07 11:03:13 +01:00
committed by GitHub
parent e081d8ab5e
commit 30e4fdbd06
11 changed files with 138 additions and 85 deletions

View File

@ -45,7 +45,6 @@ describe('computeContextStoreFilters', () => {
const contextStoreFilters: RecordFilter[] = [
{
id: 'name-filter',
variant: 'default',
fieldMetadataId: personObjectMetadataItem.fields.find(
(field) => field.name === 'name',
)!.id,