@lemon-fe/components 1.4.21 → 1.4.22-alpha.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.
- package/es/data-grid/index.d.ts +1 -1
- package/es/data-grid/index.js +11 -8
- package/package.json +2 -2
package/es/data-grid/index.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ declare class InternalDataGrid<TData extends Record<string, any>> extends Compon
|
|
|
81
81
|
*/
|
|
82
82
|
private loadingChange;
|
|
83
83
|
private getDataFromServer;
|
|
84
|
-
|
|
84
|
+
pagination(page: number, pageSize: number): void;
|
|
85
85
|
private init;
|
|
86
86
|
private NoRowsOverlay;
|
|
87
87
|
private getMainMenuItems;
|
package/es/data-grid/index.js
CHANGED
|
@@ -712,15 +712,11 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
|
|
|
712
712
|
var enable = false;
|
|
713
713
|
if (_typeof(pagination) === 'object') {
|
|
714
714
|
enable = true;
|
|
715
|
-
pageSize = pagination.defaultPageSize || pagination.pageSize ||
|
|
715
|
+
pageSize = pagination.defaultPageSize || pagination.pageSize || 50;
|
|
716
716
|
page = pagination.defaultCurrent || pagination.current || 1;
|
|
717
717
|
total = pagination.total || 0;
|
|
718
|
-
} else if (pagination ===
|
|
719
|
-
enable =
|
|
720
|
-
} else if (pagination === false) {
|
|
721
|
-
enable = false;
|
|
722
|
-
total = Number.MAX_SAFE_INTEGER;
|
|
723
|
-
pageSize = Number.MAX_SAFE_INTEGER;
|
|
718
|
+
} else if (typeof pagination === 'boolean') {
|
|
719
|
+
enable = pagination;
|
|
724
720
|
} else if (fetch !== undefined) {
|
|
725
721
|
enable = true;
|
|
726
722
|
}
|
|
@@ -739,12 +735,19 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
|
|
|
739
735
|
columns = _this$props6.columns,
|
|
740
736
|
rowSelection = _this$props6.rowSelection,
|
|
741
737
|
dataSource = _this$props6.dataSource,
|
|
742
|
-
context = _this$props6.context
|
|
738
|
+
context = _this$props6.context,
|
|
739
|
+
pagination = _this$props6.pagination;
|
|
743
740
|
if (!shallowEqual(context, prevProps.context)) {
|
|
744
741
|
this.store.setState({
|
|
745
742
|
context: context
|
|
746
743
|
});
|
|
747
744
|
}
|
|
745
|
+
if (!shallowEqual(pagination, prevProps.pagination)) {
|
|
746
|
+
var pageData = this.getPagination();
|
|
747
|
+
this.setState({
|
|
748
|
+
pagination: pageData.pagination
|
|
749
|
+
});
|
|
750
|
+
}
|
|
748
751
|
if (!this.isReady) {
|
|
749
752
|
return;
|
|
750
753
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemon-fe/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.22-alpha.0",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"registry": "https://registry.npmjs.org"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "3a59adbf192d7ae863eee648925fa83ad26aa208"
|
|
62
62
|
}
|