@@ -11,6 +11,7 @@ import {
1111 isBinaryAggregationFilter ,
1212 isBinaryAggregationFilterOperator ,
1313 isComplexAggregationFilter ,
14+ isFuzzyMatchFilterOptionsAstNode ,
1415 isUnaryAggregationFilterOperator ,
1516 NewAggregatorFilterAstNode ,
1617 NewFuzzyMatchFilterOptionsAstNode ,
@@ -26,6 +27,7 @@ import { useFormatLanguage } from '@app-builder/utils/format';
2627import clsx from 'clsx' ;
2728import { Fragment , type ReactNode , useMemo , useState } from 'react' ;
2829import { Trans , useTranslation } from 'react-i18next' ;
30+ import * as R from 'remeda' ;
2931import { match } from 'ts-pattern' ;
3032import { Button , MenuCommand } from 'ui-design-system' ;
3133import { Icon } from 'ui-icons' ;
@@ -222,8 +224,12 @@ export function EditFilters({ aggregatedField, dataModel }: EditFiltersProps) {
222224 </ Button >
223225 { filter . namedChildren . value && filterEditedIndex === filterIndex ? (
224226 < OperandEditModal
225- node = { filter . namedChildren . value }
226- onSave = { ( ) => {
227+ node = { R . clone ( filter . namedChildren . value ) }
228+ onSave = { ( astNode ) => {
229+ if ( isFuzzyMatchFilterOptionsAstNode ( astNode ) ) {
230+ filter . namedChildren . value = astNode ;
231+ nodeSharp . actions . validate ( ) ;
232+ }
227233 setEditedFilterIndex ( null ) ;
228234 } }
229235 onCancel = { ( ) => {
0 commit comments