ng2-select
ng2-select copied to clipboard
active is not updated when items change
When I update items programmatically, the 'active' remains unchanged. Shouldn't 'active' be cleared on items input?
I have the same issue.
if you add or delete an array item angular seems not notice the change because the reference to this array has not changed.
if you do something like this: this.activeItems.push({id: '1', text: 'something'}); this.activeItems= JSON.parse(JSON.stringify(this.activeItems)); then the active items will be updated
the same about updating the items list
@dilotec-2015 are U sure this works?
@kotmatpockuh It works. Banged my head with this for whole two hours. You can just reinitialize te array with this.activeItems = [].
so how about in FormControlName?