You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could someone add an example/demo with a simple array as the data source? This question was posted on StackOverflow months ago and is unanswered. This would make ng2-ya-table usable for a wider audience.
The text was updated successfully, but these errors were encountered:
The data source is an Observable in order to support pagination, ordering, and filtering server side.
For example, i wrote a simple .NET library to support this ng2-ya-table.DataSource.Core.
Anyway, you can manage a simple array in this way:
public datasource: any=(request: any): Observable<any>=>{letpage=(request.start/request.length)+1;returnObservable.of({recordsTotal: this.data.length,recordsFiltered: this.data.length,data: this.data.slice(request.length*(page-1),request.length*page)});}
The example support only the pagination.
I'm looking to implement a built-in local datasource to also support filtering and sorting.
Could someone add an example/demo with a simple array as the data source? This question was posted on StackOverflow months ago and is unanswered. This would make ng2-ya-table usable for a wider audience.
The text was updated successfully, but these errors were encountered: