Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

85
Vistas
How to trigger a submit action for an input element or form while pressing enter key?

Have a simple search bar (input field) which should trigger an onSubmit action while we press Enter button

about 4 years ago · Santiago Gelvez
2 Respuestas
Responde la pregunta

0

You can use onKeyPress. Check this : https://stackoverflow.com/questions/13987300/how-to-capture-enter-key-press

about 4 years ago · Santiago Gelvez Denunciar

0

Simple, have a button type submit inside the form. Here's an example:

const onSubmit = () => {}
// ..
<form onSubmit={onSubmit}>
  ...
  <button type="submit">Search</button>
  ...
</form>

You don't need to use onKeyPress event.

about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda