Skip to content

Commit

Permalink
Fix advanced relative date filter
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-elias committed Oct 20, 2024
1 parent 1426efa commit 6af8c1e
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useCurrentViewFilter } from '@/object-record/advanced-filter/hooks/useCurrentViewFilter';
import { getInitialFilterValue } from '@/object-record/object-filter-dropdown/utils/getInitialFilterValue';
import { getOperandLabel } from '@/object-record/object-filter-dropdown/utils/getOperandLabel';
import { getOperandsForFilterDefinition } from '@/object-record/object-filter-dropdown/utils/getOperandsForFilterType';
import { SelectControl } from '@/ui/input/components/SelectControl';
Expand Down Expand Up @@ -40,9 +41,18 @@ export const AdvancedFilterViewFilterOperandSelect = ({
throw new Error('Filter is not defined');
}

const { value, displayValue } = getInitialFilterValue(
filter.definition.type,
operand,
filter.value,
filter.displayValue,
);

upsertCombinedViewFilter({
...filter,
operand,
value,
displayValue,
});
};

Expand Down

0 comments on commit 6af8c1e

Please sign in to comment.