ng2-smart-table
ng2-smart-table copied to clipboard
Prevent page jump when refreshing table data
I'm automatically refreshing the data by subscribing to HttpClient and populating LocalDataSource. Upon refresh, the page jump to top and back to the bottom where the table lies. I believe this is due to the table removing the rows then adding back the rows.
Any ideas how to prevent the page jump and make it data refresh more seamless?
source: LocalDataSource = new LocalDataSource();
this.httpService.getTableData() .subscribe((data: Data[]) => { this.source.load(data); });
Increasing the height helps, however, no way of updating graph data once loaded.
::ng-deep ng2-smart-table tr { height: 70px; }