Permalink
Browse files

fix(project): set page to 1 when reload() is called

  • Loading branch information...
VMBindraban
VMBindraban committed Aug 4, 2016
1 parent 90165cf commit 4f5dac7a0d6702905fcdefd55abf2118580c1058
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/datatable.js
@@ -166,11 +166,13 @@ export class DataTable {
}

reload() {
this.pager.reloadCount(); // sets page to 1, and triggers this.pageChanged() (reload data).
this.pager.reloadCount(); // reload the amount of results

if (this.page === 1) {
this.load(); // this.pageChanged() won't trigger if the current page is already page 1.
}

this.page = 1;
}

@computedFrom('columns')

0 comments on commit 4f5dac7

Please sign in to comment.