mirror of
https://github.com/vbenjs/vben-admin-thin-next.git
synced 2025-02-02 18:08:40 +08:00
fix: check if searchText is null (#1301)
This commit is contained in:
parent
a0165d1eee
commit
85a68d5fc3
@ -399,7 +399,7 @@
|
||||
const children = get(item, childrenField) || [];
|
||||
const title = get(item, titleField);
|
||||
|
||||
const searchIdx = title.indexOf(searchText);
|
||||
const searchIdx = searchText ? title.indexOf(searchText) : -1;
|
||||
const isHighlight =
|
||||
searchState.startSearch && !isEmpty(searchText) && highlight && searchIdx !== -1;
|
||||
const highlightStyle = `color: ${isBoolean(highlight) ? '#f50' : highlight}`;
|
||||
|
Loading…
Reference in New Issue
Block a user