mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 11:39:28 +08:00
parent
8e496966cf
commit
90511c3261
@ -104,7 +104,7 @@ class SearchTree extends React.Component {
|
||||
render() {
|
||||
const { searchValue, expandedKeys, autoExpandParent } = this.state;
|
||||
const loop = data => data.map((item) => {
|
||||
const index = item.key.search(searchValue);
|
||||
const index = item.key.indexOf(searchValue);
|
||||
const beforeStr = item.key.substr(0, index);
|
||||
const afterStr = item.key.substr(index + searchValue.length);
|
||||
const title = index > -1 ? (
|
||||
|
Loading…
Reference in New Issue
Block a user