Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
fix(project): set page to 1 when reload() is called
Browse files Browse the repository at this point in the history
  • Loading branch information
VMBindraban committed Aug 4, 2016
1 parent 90165cf commit 4f5dac7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/datatable.js
Expand Up @@ -166,11 +166,13 @@ export class DataTable {
} }


reload() { 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) { if (this.page === 1) {
this.load(); // this.pageChanged() won't trigger if the current page is already page 1. this.load(); // this.pageChanged() won't trigger if the current page is already page 1.
} }

this.page = 1;
} }


@computedFrom('columns') @computedFrom('columns')
Expand Down

0 comments on commit 4f5dac7

Please sign in to comment.