Follow-up high fixes on date refactor (#15553)

This PR fixes important bugs on date filter handling following-up date
refactor.

Fixes : https://github.com/twentyhq/core-team-issues/issues/1814
This commit is contained in:
Lucas Bordeau
2025-11-03 17:51:42 +01:00
committed by GitHub
parent bafc0496b1
commit b33b38cb02
16 changed files with 119 additions and 213 deletions
@@ -4,7 +4,7 @@ import { isCompositeFieldType } from '@/object-record/object-filter-dropdown/uti
import { type RecordFilter } from '@/object-record/record-filter/types/RecordFilter';
import { isValidSubFieldName } from '@/settings/data-model/utils/isValidSubFieldName';
import { SortOrFilterChip } from '@/views/components/SortOrFilterChip';
import { useGetRecordFilterLabelValue } from '@/views/hooks/useGetRecordFilterLabelValue';
import { useGetRecordFilterChipLabelValue } from '@/views/hooks/useGetRecordFilterChipLabelValue';
import { isNonEmptyString } from '@sniptt/guards';
import { useIcons } from 'twenty-ui/display';
@@ -26,7 +26,7 @@ export const EditableFilterChip = ({
recordFilter.fieldMetadataId,
);
const { getRecordFilterLabelValue } = useGetRecordFilterLabelValue();
const { getRecordFilterChipLabelValue } = useGetRecordFilterChipLabelValue();
const FieldMetadataItemIcon = getIcon(fieldMetadataItem.icon);
@@ -47,9 +47,8 @@ export const EditableFilterChip = ({
: recordFilter.label;
const labelKey = `${fieldNameLabel}`;
const labelValue = getRecordFilterLabelValue({
const labelValue = getRecordFilterChipLabelValue({
recordFilter,
fieldMetadataOptions: fieldMetadataItem.options ?? [],
});
return (