Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

182
Views
Ant Design - emphasize matching TreeNode based on custom search filter in TreeSelect

I want to use custom filterTreeNode function which in my case filters nodes based on title and regardless locale letters (it's exact extension of default filtering based on title). The problem is that I am not able to emphasize matching nodes.

Here is my example: https://codesandbox.io/s/tree-select-custom-filtertreenode-8zxgy

Pay attention that I'm using treeNodeFilterProp="title" to gain some desired user experience, but it's not enough in my case.

When I'm typing "aaa" my nodes are filtering properly and the "aaaą" node is emphasized (due to treeNodeFiltersProp).

emphasized node

But when I'm writing "aaaa" my node is still showing up but is not emphasized, which is not exactly what I wanted.

nonemphasied node

So how to do this?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

problem seams to be in

https://github.com/react-component/tree-select/blob/abba52deff6cfb8d38758ad3fa0af35b327fa555/src/OptionList.tsx#L137

as it overrides the filterTreeNode function this is why it isn't bold.


For option filtering the given function is used, this is why it is showing:

https://github.com/react-component/tree-select/blob/7b020ccc0156b89a9006f76627d2ccbcd14cddcc/src/generate.tsx#L546

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!