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

120
Visualizações
IonInput: IonOnChange event firing twice

Current behavior: IonOnChange event for IonInput fires twice when backspacing 1 character.

Version: "@ionic/react": "5.6.11",

Expected behavior: When value is 1 character and backspace is pressed, input value should be empty.

Steps to reproduce: If I enter any 10 characters, lets say "randomstring", into the input ,the value is now randomstring and then I press backspace to completely erase the value inside the input field, onChange event fires and input is empty, then onChange event fires a 2nd time with value of "r" (or what the previous character was) and input goes back to "r" (or the previous character) again. If i keep hitting backspace repeatedly the same thing happens until eventually the input clears.

Related Code:

<IonInput
        style={{ border: "1px solid black" }}
        onIonChange={handlePostcodeChange}
        value={postCodeInputValue}
        placeholder="Postcode"
        pattern="/^[a-z0-9]+$/i"
        maxlength={10}
        type="text"
      />

Reproducible Code Link : CodeSandbox Link

UPDATE : This is an issue in ionic ,and the I've raised the bug too. https://github.com/ionic-team/ionic-framework/issues/25287

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