tree-select icon indicating copy to clipboard operation
tree-select copied to clipboard

Allow prop highlightTreeNode to be passed in or match custom filterTreeNode with highlighting

Open simondiep opened this issue 7 years ago • 1 comments

If I pass in filterTreeNode, I am able to customize which items are filtered. However, that is different from what is highlighted. I'd like for the highlighting to be consistent with the filtering. The easiest way would be to check if filterTreeNode is defined, and if so, apply highlighting based on that prop, rather than highlighting independently

https://github.com/react-component/tree-select/blob/master/src/SelectTrigger.jsx#L175

For example: filterTreeNode={(input, child) => { return child.props.value.toLowerCase().indexOf(input.toLowerCase()) > -1}}

I'd expect the highlight function to match: highlightTreeNode={(input, child) => { return child.props.value.toLowerCase().indexOf(input.toLowerCase()) > -1}}

But since highlightTreeNode is not a valid prop, the highlighting is different

simondiep avatar Mar 16 '17 18:03 simondiep

+ i also need some highlighting func

zero-t4 avatar Aug 01 '17 13:08 zero-t4