-
Notifications
You must be signed in to change notification settings - Fork 74
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
suggestions don't update on list prop change #301
Comments
You can use clearSuggestions() method to get rid of previous suggestions when you are updating your list. I believe its easier than using watchers which i personally don't like using. So your code (the first one) looks like this: updateList function (using ref to call clearSuggestions)-- |
Thank you for proposing workaround, but I think that
|
You can try to use |
I'm submitting a ...
What is the current behavior?
Updating
list
prop doesn't affectsuggestions
until input value changeIf the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
https://jsfiddle.net/pq38tusw/1/
list
prop changed, butsuggestions
does notWhat is the expected behavior?
suggestions
should change accordingly tolist
, as if it was computed property oflist
Please tell us about your environment:
To fix it we can watch
list
prop and doresearch()
in the watcher.But
list
prop also can be a function, and in such case, we can't watch it:https://jsfiddle.net/pq38tusw/2/
I propose to throw on non-async functions and guide users to use Array instead of a non-async function so they will not be caught by such bug.
The text was updated successfully, but these errors were encountered: