@onehat/data 1.8.26 → 1.8.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/OneHatData.js
CHANGED
|
@@ -740,7 +740,7 @@ export default class Repository extends EventEmitter {
|
|
|
740
740
|
* Resets the pagination to page one
|
|
741
741
|
* @fires changePageSize
|
|
742
742
|
*/
|
|
743
|
-
resetPagination = (
|
|
743
|
+
resetPagination = () => {
|
|
744
744
|
if (this.isDestroyed) {
|
|
745
745
|
throw Error('this.resetPagination is no longer valid. Repository has been destroyed.');
|
|
746
746
|
}
|
|
@@ -758,11 +758,13 @@ export default class Repository extends EventEmitter {
|
|
|
758
758
|
if (!this.isPaginated) {
|
|
759
759
|
return false;
|
|
760
760
|
}
|
|
761
|
+
|
|
762
|
+
pageSize = parseInt(pageSize, 10);
|
|
761
763
|
if (_.isEqual(this.pageSize, pageSize)) {
|
|
762
764
|
return false;
|
|
763
765
|
}
|
|
764
766
|
|
|
765
|
-
// Reset to page 1
|
|
767
|
+
// Reset to page 1 (don't use setPage(), so we can skip _onChangePagination, which we'll do later)
|
|
766
768
|
this.page = 1;
|
|
767
769
|
this.emit('changePage');
|
|
768
770
|
|