This plunkr is to demonstrate a problem I am having with checkbox binding in Aurelia.
Here are the steps to reproduce:
- Select "Field 1" and check the box for the value "A"
- Now select "Field 2" and check the box for the value "1"
- Select "Field 1" again. You will see that "A" is not checked
- Check the box for "B" on "Field 1" and "A" will become checked again as well.
I have added badges against the fields so that you can see the count of the selected values. These prove that the binding is actually working correctly, so there must be a problem in the rendering of the items.
This is more obvious when you check the value "4" for "Field 2". This one actually stays checked correctly and I think that is because it is removed and re-added to the DOM when swapping between fields.