Skip to content

Commit

Permalink
Disable pagination if page size is 0 fixes #32
Browse files Browse the repository at this point in the history
  • Loading branch information
Hector Romero committed Jul 23, 2017
1 parent e867203 commit a29a807
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions dist/amd/au-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ define(['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
};

AureliaTableCustomAttribute.prototype.hasPagination = function hasPagination() {
return this.currentPage > 0;
return this.currentPage > 0 && this.pageSize > 0;
};

AureliaTableCustomAttribute.prototype.dataChanged = function dataChanged() {
Expand Down Expand Up @@ -444,4 +444,4 @@ define(['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
enumerable: true,
initializer: null
})), _class2)) || _class);
});
});
2 changes: 1 addition & 1 deletion dist/commonjs/au-table-pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,4 +244,4 @@ var AutPaginationCustomElement = exports.AutPaginationCustomElement = (_dec = (0
initializer: function initializer() {
return '>';
}
})), _class));
})), _class));
4 changes: 2 additions & 2 deletions dist/commonjs/au-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ var AureliaTableCustomAttribute = exports.AureliaTableCustomAttribute = (_dec =
};

AureliaTableCustomAttribute.prototype.hasPagination = function hasPagination() {
return this.currentPage > 0;
return this.currentPage > 0 && this.pageSize > 0;
};

AureliaTableCustomAttribute.prototype.dataChanged = function dataChanged() {
Expand Down Expand Up @@ -440,4 +440,4 @@ var AureliaTableCustomAttribute = exports.AureliaTableCustomAttribute = (_dec =
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, 'api', [_dec5], {
enumerable: true,
initializer: null
})), _class2)) || _class);
})), _class2)) || _class);
2 changes: 1 addition & 1 deletion dist/es2015/au-table-pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,4 @@ export let AutPaginationCustomElement = (_dec = bindable({ defaultBindingMode: b
initializer: function () {
return '>';
}
})), _class));
})), _class));
4 changes: 2 additions & 2 deletions dist/es2015/au-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export let AureliaTableCustomAttribute = (_dec = inject(BindingEngine), _dec2 =
}

hasPagination() {
return this.currentPage > 0;
return this.currentPage > 0 && this.pageSize > 0;
}

dataChanged() {
Expand Down Expand Up @@ -337,4 +337,4 @@ export let AureliaTableCustomAttribute = (_dec = inject(BindingEngine), _dec2 =
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, 'api', [_dec5], {
enumerable: true,
initializer: null
})), _class2)) || _class);
})), _class2)) || _class);
2 changes: 1 addition & 1 deletion dist/system/au-table-pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,4 @@ System.register(['aurelia-framework'], function (_export, _context) {
_export('AutPaginationCustomElement', AutPaginationCustomElement);
}
};
});
});
4 changes: 2 additions & 2 deletions dist/system/au-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ System.register(['aurelia-framework'], function (_export, _context) {
};

AureliaTableCustomAttribute.prototype.hasPagination = function hasPagination() {
return this.currentPage > 0;
return this.currentPage > 0 && this.pageSize > 0;
};

AureliaTableCustomAttribute.prototype.dataChanged = function dataChanged() {
Expand Down Expand Up @@ -453,4 +453,4 @@ System.register(['aurelia-framework'], function (_export, _context) {
_export('AureliaTableCustomAttribute', AureliaTableCustomAttribute);
}
};
});
});
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/au-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export class AureliaTableCustomAttribute {
}

hasPagination() {
return this.currentPage > 0;
return this.currentPage > 0 && this.pageSize > 0;
}

dataChanged() {
Expand Down

0 comments on commit a29a807

Please sign in to comment.