-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
selectionChanged loop in 2.2.2 #151
Comments
This usually happens because a change is, in fact, occuring. Remember that the value of a select must always be one of its options, so if the value you pass in is You can always have a null option. If this does not work, then it is definitely a bug. I.e. a value of |
Thanks for your replies! @cowboyd: In this case a change isn't occurring, and there is a null option in the first position ( @Robdel12: using It seems to happen like this: Each option calls I really really really don't have time to investigate further (we are shipping on Monday!) but I think it's definitely a bug or regression caused by ea95225. I can maybe create a fiddle next week if it's not too crazy, but until then I'm just going to pin @ 2.2.1. |
Null firing on null? That's definitely a bug!
|
seeing this behavior from [email protected] in my project's integration tests |
A year later, but ran into this issue when attempting to upgrade from 2.0.2 to 2.2.3+. Currently, forced to fork and wrap an Hopefully once we are able to fully migrate and test our components with pure one-way, we can revert back to the main branch. |
- adopted-ember-addons#151 for more details
Version of x-select: 2.2.2
Ember Version / Ember CLI Version:
Ember Version: 2.6
Ember CLI Version: 2.6
Expected Behavior
Initializing an
x-select
should not immediately trigger the changedaction
Actual Behavior
Initializing an
x-select
immediately triggers the changedaction
Info
We initialize an
x-select
component with thevalue
set to a models attribute,foo.bar
. Ouraction
bubbles up and eventually triggers asave
on the model, which worked absolutely fine until version2.2.2
of this addon.In
2.2.2
thechange
event is immediately triggered, which causes an infinite loop where the event causes a save, which then causes the property to change and the change event to fire again for some reason. We hide the select box while the model is saving (I think this is a fairly common pattern), which destroys the component. When the model finishes saving the component is re-created, which then again triggers the save event.It is caused by this commit: ea95225
The text was updated successfully, but these errors were encountered: