mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
fix: throughCollection support fuzzy search (#3949)
This commit is contained in:
parent
47dffe55b5
commit
04b6d79dcb
@ -326,13 +326,13 @@ export const ThroughCollection = observer(
|
||||
}
|
||||
}, []);
|
||||
const handleSearch = (value: string) => {
|
||||
const data = loadCollections();
|
||||
if (value) {
|
||||
const filteredOptions = options.filter((option) => {
|
||||
const filteredOptions = data.filter((option) => {
|
||||
return option.label.toLowerCase().includes(value.toLowerCase());
|
||||
});
|
||||
setOptions(filteredOptions);
|
||||
} else {
|
||||
const data = loadCollections();
|
||||
setOptions(data);
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user