tree-select
tree-select copied to clipboard
Allow prop highlightTreeNode to be passed in or match custom filterTreeNode with highlighting
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
+ i also need some highlighting func