Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

183
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda