mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-09-07 20:58:11 +00: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