Skip to content

Commit

Permalink
搜索后清除多余表.
Browse files Browse the repository at this point in the history
  • Loading branch information
cweijan committed Oct 26, 2021
1 parent 82f6cef commit c61ae19
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/tree/TreeNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ class TreeNode extends React.Component {
}
return c;
});
const hitSearch=!this.props.searchValue || (children[1] && children[1].includes(this.props.searchValue.toLocaleLowerCase()));
return (<span
style={{ padding: this.state.padding, paddingLeft: (row * (this.state.iconWidth + 5)) + 5 }}
style={{ padding: this.state.padding, paddingLeft: (row * (this.state.iconWidth + 5)) + 5 ,display:hitSearch?"inherit":"none"}}
>
<span
style={{
padding: this.state.padding,
color: (this.props.searchValue && children[1] && children[1].includes(this.props.searchValue.toLocaleLowerCase())) ?
'red': this.state.color.textColor,
color: this.state.color.textColor,
verticalAlign: 'middle'
}}
>{name}
Expand Down

0 comments on commit c61ae19

Please sign in to comment.