ng2-smart-table: Table not updating when list source changing

Hi,

I’ve some problems with the table. In fact i’ve 3 columns but to update each value, I need a select object of 400 lines. The problem is i’ve something like 200 lines in the table so it isn’t fluent anymore … So i used a control panel to add and modify datas in the table. The problem is the table isn’t actualizing in real time: when i use the pagination or search system i find the datas (so they are correctly added), but the list isn’t actualizing by itself. Do you know how I can do to fix this ?

Here is a screenshot git_help

my table <ng2-smart-table *ngIf="_listeParamTechnicien!=null" [settings]="settings" [source]="_listeParamTechnicien" (userRowSelect)="onUserRowSelect($event)" (deleteConfirm)="onDeleteConfirm($event)" [@enterAnimationLeft]> </ng2-smart-table>

Thanks for your help !

About this issue

Most upvoted comments

use : this.dataSource.refresh(); where dataSource is object of LocalDataSource type

I found, you have to create a source like this: import { Ng2SmartTableModule, LocalDataSource } from 'ng2-smart-table'; then you declare: source: LocalDataSource; you initiate it when you create your data liste like this : this.source = new LocalDataSource(this.mylist); and you call this one in your .html

And then, when you do an action on your list, you do it on the source object like it’s explained in the doc in the Data Source Methods part