Single Select - External API Request

Hi,

I have an API setup in Xano that accepts a single “q” input and then fetches some data from Mapbox and returns it. This works in Xano correctly as I expect.

Is there a tutorial on how I would get a single-select setup in weweb to work with this where the value inputted into the single-select box, becomes the “q” input for my Xano api and then the list of options in the single-select is the response of that API call? I would like to keep retriggering the API call as the user updates the value typed into the single-select box.

I’ve tried to work it as simply as possible but it seems like the call request shoots off right away with q = “” so the list never populates even after I start typing say “chi”.

I am trying to generate a list of City names as the user types into the field on my form. The user could then select the city name they want from the dropdown list and then I would pass that json object off to another API for inputting into a database.

Are you refreshing the collection after an input update?

I’ve gotten a little further since my original post. I am using the search w/ dropdown element.

I am still having trouble wrapping my head around this fully. I’m working on updating the value of an object on click. I’ve tried to work in the event area but no dice.

To avoid sending too many requests from the search, use the input debounce options and you could also check in the on submit workflow that the text inputted by the user has a length over X characters.