diff --git a/src/legacy/filter-picker/FilterPicker.tsx b/src/legacy/filter-picker/FilterPicker.tsx index 3ce9e48943..2a1e7e9658 100644 --- a/src/legacy/filter-picker/FilterPicker.tsx +++ b/src/legacy/filter-picker/FilterPicker.tsx @@ -8,7 +8,7 @@ import Dropdown from '../dropdown'; import defaultLocaleTextObject from './locales/zh-CN'; import './style'; -const defaultOperationsOption: operationsOptionType = { +export const defaultOperationsOption: operationsOptionType = { string: ['=', '!=', 'in', 'not in', 'like', 'not like', 'hasValue', 'noValue'], int: ['=', '!=', '>', '>=', '<', '<=', 'between', 'not between', 'hasValue', 'noValue'], double: ['=', '!=', '>', '>=', '<', '<=', 'between', 'not between', 'hasValue', 'noValue'], diff --git a/src/legacy/filter-picker/components/FilterList/Expression/FilterCondition/index.tsx b/src/legacy/filter-picker/components/FilterList/Expression/FilterCondition/index.tsx index 515f0e28d5..0c651bc4ec 100644 --- a/src/legacy/filter-picker/components/FilterList/Expression/FilterCondition/index.tsx +++ b/src/legacy/filter-picker/components/FilterList/Expression/FilterCondition/index.tsx @@ -6,7 +6,7 @@ import { attributeValue, FilterValueType, StringValue, NumberValue, DateValue } import Selector from '../../../../../selector-pro'; import { ListValue, operationsOptionType } from '../../../../interfaces'; import Tooltip from '../../../../../../tooltip'; // new -import { FilterPickerContext, TextObject } from '../../../../FilterPicker'; +import { defaultOperationsOption, FilterPickerContext, TextObject } from '../../../../FilterPicker'; import defaultLocaleTextObject from '../../../../locales/zh-CN'; interface FilterConditionProps { @@ -95,7 +95,7 @@ function FilterCondition(props: FilterConditionProps) { curryDimensionValueRequest={curryDimensionValueRequest} values={values} exprKey={exprKey} - operationsOption={operationsOption} + operationsOption={{ ...defaultOperationsOption, ...operationsOption }} numType={numType} /> );