bind `selection` to a field and updating the field isn't reflected in the list
Closed this issue · 2 comments
zoechi commented
see also #140
I tried to bind the selection attribute to a field in my model
<core-list-dart id="menu"
data="{{model.filtered}}"
selection="{{model.activeItem}}"
class="children" flex height="16">
and expected when I assign an item to model.activeItem
that core-list-dart
shows this item as selected but it doesn't.
jakemac53 commented
Not sure if this changed, in 0.5.0 but it looks like the way to set the selected item is through the selectItem(int index) and setItemSelected(int index, bool isSelected) methods.
This looks like it should really be a getter for a private variable.
jakemac53 commented
This is one of a few cases where it seems like we almost need a third binding type for one-way bindings...