feat: Filter parameter: Improve loose type validation for booleans (#10702)
This commit is contained in:
@@ -42,6 +42,8 @@ const i18n = useI18n();
|
||||
const ndvStore = useNDVStore();
|
||||
const { debounce } = useDebounce();
|
||||
|
||||
const debouncedEmitChange = debounce(emitChange, { debounceTime: 1000 });
|
||||
|
||||
function createCondition(): FilterConditionValue {
|
||||
return { id: uuid(), leftValue: '', rightValue: '', operator: DEFAULT_OPERATOR_VALUE };
|
||||
}
|
||||
@@ -86,7 +88,7 @@ watch(
|
||||
try {
|
||||
newOptions = {
|
||||
...DEFAULT_FILTER_OPTIONS,
|
||||
...resolveParameter(typeOptions as NodeParameterValue),
|
||||
...resolveParameter(typeOptions as unknown as NodeParameterValue),
|
||||
};
|
||||
} catch (error) {}
|
||||
|
||||
@@ -117,8 +119,6 @@ function emitChange() {
|
||||
});
|
||||
}
|
||||
|
||||
const debouncedEmitChange = debounce(emitChange, { debounceTime: 1000 });
|
||||
|
||||
function addCondition(): void {
|
||||
state.paramValue.conditions.push(createCondition());
|
||||
debouncedEmitChange();
|
||||
|
||||
@@ -8,6 +8,7 @@ export const DEFAULT_FILTER_OPTIONS: FilterOptionsValue = {
|
||||
caseSensitive: true,
|
||||
leftValue: '',
|
||||
typeValidation: 'strict',
|
||||
version: 1,
|
||||
};
|
||||
|
||||
export const OPERATORS_BY_ID = {
|
||||
|
||||
Reference in New Issue
Block a user