@widergy/energy-ui 3.4.7 → 3.4.8
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/CHANGELOG.md +7 -0
- package/dist/components/UTTable/index.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [3.4.8](https://github.com/widergy/energy-ui/compare/v3.4.7...v3.4.8) (2024-03-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* page change in case external integration type ([#431](https://github.com/widergy/energy-ui/issues/431)) ([1cbccfe](https://github.com/widergy/energy-ui/commit/1cbccfefe1fd2c80f58b0b5d215be916e8c153eb))
|
|
7
|
+
|
|
1
8
|
## [3.4.7](https://github.com/widergy/energy-ui/compare/v3.4.6...v3.4.7) (2024-03-15)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -104,8 +104,8 @@ const UTTable = _ref => {
|
|
|
104
104
|
setSelectedRows(selectable ? initialSelectedRows : []);
|
|
105
105
|
setRows((0, _utils.orderRows)(data, order, data, columns));
|
|
106
106
|
if (externalRowsPerPage) setRowsPerPage(initialValidRowsPerPageOption);
|
|
107
|
-
const validPage = data.length / rowsPerPage > page
|
|
108
|
-
if (!validPage) setPage(initialValidPage);
|
|
107
|
+
const validPage = data.length / rowsPerPage > page;
|
|
108
|
+
if (!validPage || integrationType === _UTTable.INTEGRATION_TYPES.EXTERNAL) setPage(initialValidPage);
|
|
109
109
|
}, [data]);
|
|
110
110
|
const currentRows = (0, _react.useMemo)(() => disablePagination || integrationType === _UTTable.INTEGRATION_TYPES.EXTERNAL ? rows : (0, _utils.getCurrentRows)(rows, page, rowsPerPage), [page, rowsPerPage, rows]);
|
|
111
111
|
const handleOrder = newOrder => {
|