mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
ui: problemconfig: fix extra_files autocomplete
This commit is contained in:
2 files changed
+7
-3
No files matched your search
@@ -128,9 +128,12 @@ const AutoComplete = forwardRef(function Impl<T>(props: AutoCompleteProps<T>, re
|
||||
setCurrentItem((!freeSolo && queryCache[query].length > 0) ? 0 : null);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
setSelectedKeys(props.selectedKeys || []);
|
||||
}, [JSON.stringify(props.selectedKeys)]);
|
||||
const dispatchChange = () => {
|
||||
if (!multi) onChange(inputRef.current?.value);
|
||||
else onChange([...selectedKeys, inputRef.current?.value].filter((v) => v?.trim().length > 0).join(','));
|
||||
else onChange(selectedKeys.filter((v) => v?.trim().length > 0).join(','));
|
||||
};
|
||||
|
||||
let first = !multi;
|
||||
|
||||
Reference in new issue
Block a user