Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<ng-select> [items] value don't update

I am working on a page where I need a select box with search field, so I decided to use the ngSelect module for it.

My HTML:

   <ng-select [items]="mesurePoints"
            bindLabel="name"
            bindValue="id"
            >
   </ng-select>  

select list is not linked to mesurePoints value after some changes.

like image 357
Tom Avatar asked Apr 12 '18 14:04

Tom


1 Answers

this.mesurePoints = [...this.mesurePoints]

It will update your Items https://github.com/ng-select/ng-select#change-detection

like image 170
Фаррух Фатхуллаев Avatar answered Nov 12 '22 02:11

Фаррух Фатхуллаев