fix(web): workflow's variables bugfix

This commit is contained in:
zhaoying
2026-01-23 13:48:51 +08:00
parent c5c2f84356
commit 27d1174dbb
3 changed files with 92 additions and 139 deletions

View File

@@ -91,15 +91,11 @@ const VariableSelect: FC<VariableSelectProps> = ({
onChange={handleChange}
showSearch
allowClear={allowClear}
optionFilterProp="value"
filterOption={(input, option) => {
if (input === '/') return true;
if (option?.options) {
return option.label?.toLowerCase().includes(input.toLowerCase()) ||
option.options.some((opt: any) =>
opt.value.toLowerCase().includes(input.toLowerCase())
);
}
return option?.label?.toLowerCase().includes(input.toLowerCase()) ?? false;
const value = 'value' in option! ? option.value as string : '';
return value.toLowerCase().includes(input.toLowerCase());
}}
/>
)