Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onUpdate fires everywhere #138

Open
kilianso opened this issue May 30, 2022 · 0 comments
Open

onUpdate fires everywhere #138

kilianso opened this issue May 30, 2022 · 0 comments

Comments

@kilianso
Copy link

kilianso commented May 30, 2022

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 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.

@kilianso kilianso changed the title Option to disable onfocus event onUpdate fires everywhere May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant