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
I'm using attr-value + event-change instead of data-value to be able to implement custom logic when the value changes inside the listener instead of direct data coupling.
The issue that arose is the following:
When booting up the document and setting the initial value for the select value, the correct option cannot be selected.
Due to the order of the databinding statement in the hierarchy, the attr-value data view is evaluated before the data-for generates all the option children.
Thus the drop down widget only sees a single option (the data-for prototype) instead of the finished list.
The workaround is to use data-attrif-selected on each option instead of attr-value on the select, but i feel like this is quite unexpected and both ways should work.
I guess the data-for being a structural data binding element should be evaluated before? What do you think?
The text was updated successfully, but these errors were encountered:
I agree that it would be nice if we could make this work. Evaluating data-for first generally seems like a good idea, but they themselves need to be updated in tree depth order I guess? We need to figure out the exact rules and ensure things work out as expected, and ideally we can make them deterministic.
It might be as simple as adding a large enough sort order bias to the data-for view.
I've just run into an interesting situation that was quite unexpected. Consider the following layout
I'm using
attr-value
+event-change
instead ofdata-value
to be able to implement custom logic when the value changes inside the listener instead of direct data coupling.The issue that arose is the following:
When booting up the document and setting the initial value for the select value, the correct option cannot be selected.
Due to the order of the databinding statement in the hierarchy, the
attr-value
data view is evaluated before thedata-for
generates all the option children.Thus the drop down widget only sees a single option (the
data-for
prototype) instead of the finished list.The workaround is to use
data-attrif-selected
on each option instead ofattr-value
on the select, but i feel like this is quite unexpected and both ways should work.I guess the
data-for
being a structural data binding element should be evaluated before? What do you think?The text was updated successfully, but these errors were encountered: