@widergy/energy-ui 2.12.3 → 2.12.4

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.
@@ -79,7 +79,7 @@ const UTTable = _ref => {
79
79
  totalRows,
80
80
  totalRowsLabel
81
81
  } = _ref;
82
- const initialValidRowsPerPageOption = (0, _utils.getInitialValidRowsPerPage)(externalRowsPerPage, rowsPerPageOptions, data);
82
+ const initialValidRowsPerPageOption = (0, _utils.getInitialValidRowsPerPage)(externalRowsPerPage, rowsPerPageOptions, data, integrationType, totalRows);
83
83
  const initialValidPage = (0, _utils.getInitialValidPage)(externalPage, initialValidRowsPerPageOption, data, integrationType);
84
84
  const [order, setOrder] = (0, _react.useState)(initialOrder || {});
85
85
  const [rows, setRows] = (0, _react.useState)([]);
@@ -136,9 +136,9 @@ const createRowStyles = (rowPadding, rowSpacing, headerPadding, isResponsive) =>
136
136
  exports.createRowStyles = createRowStyles;
137
137
  const getSelectableRowIds = (rows, rowKey, disableRowSelection) => (disableRowSelection ? rows.filter(_row => !disableRowSelection(_row)) : rows).map(_row => _row[rowKey]);
138
138
  exports.getSelectableRowIds = getSelectableRowIds;
139
- const getInitialValidRowsPerPage = (externalOption, originalOptions, data) => {
139
+ const getInitialValidRowsPerPage = (externalOption, originalOptions, data, integrationType, totalRows) => {
140
140
  if (externalOption === undefined) return originalOptions[0];
141
- const options = (0, _utils.getPageSizeOptions)(originalOptions, data.length).map(_ref2 => {
141
+ const options = (0, _utils.getPageSizeOptions)(originalOptions, integrationType === _UTTable.INTEGRATION_TYPES.EXTERNAL ? totalRows : data.length).map(_ref2 => {
142
142
  let {
143
143
  value
144
144
  } = _ref2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "2.12.3",
3
+ "version": "2.12.4",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",