fix(data-vi): custom filter conditions are not applied (#4671)

* fix(data-vi): custom filter conditions are not applied

* fix: default value
This commit is contained in:
YANG QIA 2024-06-15 13:35:27 +08:00 committed by GitHub
parent d2b2ac69e6
commit de0fb26609
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -417,7 +417,7 @@ export const useChartFilter = () => {
if (!(typeof value === 'string' && value.startsWith('{{$') && value?.endsWith('}}'))) { if (!(typeof value === 'string' && value.startsWith('{{$') && value?.endsWith('}}'))) {
return value; return value;
} }
if (['$user', '$date', '$nDate', '$nRole'].some((n) => value.includes(n))) { if (['$user', '$date', '$nDate', '$nRole', '$nFilter'].some((n) => value.includes(n))) {
return value; return value;
} }
const result = variables?.parseVariable(value); const result = variables?.parseVariable(value);

View File

@ -36,7 +36,7 @@ export const useGeneralVariableOptions = (
[datetimeSettings, currentUserSettings, currentRoleSettings, urlSearchParamsSettings], [datetimeSettings, currentUserSettings, currentRoleSettings, urlSearchParamsSettings],
); );
if (!operator || !schema) return []; if (!schema) return [];
return result; return result;
}; };