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

109
Visualizações
Prevent dropdown from closing when clicking checkbox-label inside dropdown of react-select

I'm trying to put a couple of checkboxes inside the dropdown of React-select to filter the options of the dropdown.

I've seen this: React-Select custom input inside MenuList and tried to replicate this: https://codesandbox.io/embed/m75wlyx3oy. It seems like the prop onMenuInputFocus is the key here. But this prop doesn't exist anymore in the version I'm using(5.2.1^).

I am able to click the checkbox itself without closing the dropdown by stopping the event propagation. But that doesn't seem to work when clicking the label.

Does anyone know of an alternative to onMenuInputFocus? Or another way to keep the dropdown open?

about 4 years ago · Juan Pablo Isaza
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