mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 09:29:16 +00:00
fix: remove search by packageName (#2901)
This commit is contained in:
parent
ab9457c7fc
commit
741e220fd3
@ -75,14 +75,17 @@ const LocalPlugins = () => {
|
|||||||
|
|
||||||
const pluginList = useMemo(() => {
|
const pluginList = useMemo(() => {
|
||||||
let list = filterList[filterIndex]?.list || [];
|
let list = filterList[filterIndex]?.list || [];
|
||||||
if (debouncedSearchValue) {
|
const searchLowerCaseValue = debouncedSearchValue.toLocaleLowerCase().trim();
|
||||||
|
if (searchLowerCaseValue) {
|
||||||
list = _.filter(
|
list = _.filter(
|
||||||
list,
|
list,
|
||||||
(item) =>
|
(item) =>
|
||||||
item.name?.includes(debouncedSearchValue) ||
|
String(item.displayName || '')
|
||||||
item.description?.includes(debouncedSearchValue) ||
|
.toLocaleLowerCase()
|
||||||
item.displayName?.includes(debouncedSearchValue) ||
|
.includes(searchLowerCaseValue) ||
|
||||||
item.packageName?.includes(debouncedSearchValue),
|
String(item.description || '')
|
||||||
|
.toLocaleLowerCase()
|
||||||
|
.includes(searchLowerCaseValue),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
|
Loading…
Reference in New Issue
Block a user