@1024pix/pix-ui 52.1.0 → 52.2.0

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.
@@ -70,7 +70,7 @@ export default class PixPagination extends Component {
70
70
  }
71
71
 
72
72
  get pageSize() {
73
- return this.args.pagination ? this.args.pagination.pageSize : this.args.pageOptions[0];
73
+ return this.args.pagination ? this.args.pagination.pageSize : this.pageOptions[0].value;
74
74
  }
75
75
 
76
76
  get isNextPageDisabled() {
@@ -104,18 +104,28 @@ export default class PixPagination extends Component {
104
104
  return Math.min(rowCount, this.firstItemPosition + this.pageSize - 1);
105
105
  }
106
106
 
107
+ @action
108
+ onChange() {
109
+ if (typeof this.args.onChange !== 'function') return;
110
+
111
+ this.args.onChange();
112
+ }
113
+
107
114
  @action
108
115
  changePageSize(value) {
109
116
  this.router.replaceWith({ queryParams: { pageSize: value, pageNumber: 1 } });
117
+ this.onChange();
110
118
  }
111
119
 
112
120
  @action
113
121
  goToNextPage() {
114
122
  this.router.replaceWith({ queryParams: { pageNumber: this.nextPage } });
123
+ this.onChange();
115
124
  }
116
125
 
117
126
  @action
118
127
  goToPreviousPage() {
119
128
  this.router.replaceWith({ queryParams: { pageNumber: this.previousPage } });
129
+ this.onChange();
120
130
  }
121
131
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "52.1.0",
3
+ "version": "52.2.0",
4
4
  "description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
5
5
  "keywords": [
6
6
  "ember-addon"