Skip to content

Commit

Permalink
fix: reset page offset when underlying data is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Ritik Rishu committed Feb 15, 2017
1 parent 3aa6e8a commit 6d58cb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/datatable.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ export class DatatableComponent implements OnInit, AfterViewInit, DoCheck {
}

this._rows = val;

//reset page offset on input changes due to filtering or other reason
this.offset = 0;
// recalculate sizes/etc
this.recalculate();
}
Expand Down

0 comments on commit 6d58cb2

Please sign in to comment.