You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using a backbone collection to fill the options of a select box do not subscribe the bow to the collection changes. So, on collection:change, simulating a change on the observed attribute is the only way to force the select options to refresh.
In the following code, removing the 2 lines after the magic comment reproduce this issue.
I can't see the problem, with or without the two lines of code underneath the magic comment. What version of stickit are you using? Selects should re-render on add, remove, reset or sort in the latest version of stickit (see: 8d84286)
I've update your sample with another url for stickit dependency, it wasn't working (find it here) — the version used is the latest, 0.8.
The sample reproduces the issue: without the 'magic' comment, changing the first select do not rerender the second select (which still displays 'Paris' and 'London' instead of 'Prague' and 'Venice' ).
It means that reseting a collection attached to select options is not triggering a render as I expect it too.
The 'magic' forces the rerender by changing the model attribute attached to the select.
Thanks for your help.
ps. maybe it's fixed in master, but I cannot find a proper dependency on a cdn right now (which is not surprising ;-)
Using a backbone collection to fill the options of a select box do not subscribe the bow to the collection changes. So, on
collection:change
, simulating a change on the observed attribute is the only way to force the select options to refresh.In the following code, removing the 2 lines after the
magic
comment reproduce this issue.The text was updated successfully, but these errors were encountered: