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

259
Visualizações
How to trigger onSelectionChange only when caret moves but input has not changed?

I have an use case in my React Native app (trying to implement mentions) where I need to call a function on the event of onSelectionChange only when the text in the input has not changed but the caret was moved.

At the moment the onSelectionChange function is called when I write as well, but I need it to be called only when the caret was movet without writing anything inside the input.

Is that possible? Sorry I don't really have any code to show for it since I explained what I need, but I did not find anything to check of the caret was moved without adding any new text?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

you should try something like onblur

https://reactnative.dev/docs/textinput#onendediting

https://reactnative.dev/docs/textinput#onblur

this will trigger when you leave the field, you can write your validation in the callback method.

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