Aurelia-Bootstrap-Plugins
Aurelia-Bootstrap-Plugins copied to clipboard
Content of dropdown list not updated when bound collection is replaced
I use abp-select in a table like this:
<table>
<tr repeat.for="item of items">
<!-- some other columns -->
<td>
<abp-select
collection.bind="item.subItems"
selected-item.bind="item.selectedSubItem">
</abp-select>
</td>
</tr>
</table>
Now the problem is that item.subItems
may change (i.e. the entire array gets replaced); but when it does, the content of the dropdown list doesn't change.
By contrast, when I use a regular <select>
, it works as expected, i.e. the <option>
list get updated when item.subItems
changes:
<table>
<tr repeat.for="item of items">
<!-- some other columns -->
<td>
<select
value.bind="item.selectedSubItem">
<option repeat.for="subItem of item.subItems" model.bind="subItem">
${subItem.option}
</option>
</select>
</td>
</tr>
</table>
Am I using <abp-select>
incorrectly, or is this a bug?