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