mirror of
https://gitee.com/bootx/dax-pay-ui
synced 2026-08-12 23:45:39 +08:00
fix: check if searchText is null (#1301)
This commit is contained in:
@@ -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}`;
|
||||
|
||||
Reference in New Issue
Block a user