Very useful package! I'm using it together with the Mapbox Geocoding API to fetch and display locations. One problem i have is that the focus event keeps triggering an API call even though a result has already been selected. So why not just keeping the previous results in a variable and show them in a list on focus but only listen to the change event to update that list?
UPDATE: I just realized, that the onUpdate event triggers everywhere. You can click where ever you want on the document and it triggers an update. Can be easily reproduced by putting a console log in the onUpdate method.
Hey there
Very useful package! I'm using it together with the Mapbox Geocoding API to fetch and display locations. One problem i have is that the
focus
event keeps triggering an API call even though a result has already been selected. So why not just keeping the previous results in a variable and show them in a list onfocus
but only listen to thechange
event to update that list?UPDATE: I just realized, that the
onUpdate
event triggers everywhere. You can click where ever you want on the document and it triggers an update. Can be easily reproduced by putting a console log in theonUpdate
method.