Ng2-select: ui select list does't update

Created on 22 May 2017  路  1Comment  路  Source: valor-software/ng2-select

when the array is updated in the component it does not re initialize list in ui select

Most helpful comment

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.itemList.push({id: '1', text: 'something'});
this.itemList= JSON.parse(JSON.stringify(this.itemList));
then the items list will be updated

>All comments

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.itemList.push({id: '1', text: 'something'});
this.itemList= JSON.parse(JSON.stringify(this.itemList));
then the items list will be updated

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carstenschaefer picture carstenschaefer  路  5Comments

ronzeidman picture ronzeidman  路  3Comments

jenb34 picture jenb34  路  5Comments

TheBurgerShot picture TheBurgerShot  路  4Comments

253936563 picture 253936563  路  5Comments