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

196
Vistas
Firing a form submit when completion is clicked on places autocomplete

I've been trying to find how to fire a form submission when a completion is clicked with places autocomplete, but I cannot figure this out.

I have a custom method placeChanged which I'm calling with

this.autocomplete.addListener('place_changed', this.placeChanged)

and the method is as follows

placeChanged() {
    this.place = this.autocomplete.getPlace()
    const addressComponents = this.place.address_components

    if (addressComponents !== undefined) {
        const formattedAddress = this.formatAddressComponents(addressComponents)

        this.setAddressComponents(formattedAddress)
    }

    if (this.place.geometry !== undefined) {
        this.setGeometry(this.place.geometry)
    }
}

the form will submit upon clicking enter, but I would like it to submit whenever I choose a completion form the list so that I could get rid of the 'submit' button on my form. How can I achieve this? The docs doesn't cover this at all.

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