mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-14 20:54:30 +08:00
Fix: Deduplication of wiki entity types (#17965)
This commit is contained in:
@@ -55,7 +55,8 @@ export type SelectWithSearchFlagProps = {
|
||||
placeholder?: string;
|
||||
emptyData?: string;
|
||||
allowCustomValue?: boolean;
|
||||
onNoMatchEnter?(searchValue: string): void;
|
||||
// Return false to veto selecting the custom value on Enter
|
||||
onNoMatchEnter?(searchValue: string): boolean | void;
|
||||
disableAutoSelectOnEnter?: boolean;
|
||||
testId?: string;
|
||||
optionTestIdPrefix?: string;
|
||||
@@ -221,7 +222,10 @@ export const SelectWithSearch = forwardRef<
|
||||
setSearchValue('');
|
||||
setOpen(false);
|
||||
} else if (!hasMatchingOptions(options, keywords)) {
|
||||
onNoMatchEnter?.(keywords);
|
||||
if (onNoMatchEnter?.(keywords) === false) {
|
||||
// Vetoed: prevent cmdk from selecting the custom value item
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user