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

197
Visualizações
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 à 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