1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Dash Input not callingback after Google Places Autocompletion

Discussão em 'Python' iniciado por Stack, Setembro 12, 2024.

  1. Stack

    Stack Membro Participativo

    I have the following callback

    @app.callback(Output("full_address", "data"),
    Input("corrected_address", "value"))
    def store_address(inputdata):
    print(inputdata)
    return inputdata


    which is tied to the element created by

    dbc.Input(id="corrected_address")


    This element uses a Google Places auto complete element:

    var input = document.getElementById('corrected_address');
    var autocomplete = new google.maps.places.Autocomplete(input);
    autocomplete.setFields(['address_component', 'geometry', 'name']);


    The auto complete shows up as expected. [​IMG]

    However, when completed, the callback is not triggered [​IMG]

    Updating the field by adding or removing a character updates the value as expected. [​IMG]

    I feel like I'm missing something simple here. How can I get the callback to trigger?

    I'm using dash and dash-bootstrap-components, Python 3.10.12.

    Continue reading...

Compartilhe esta Página