labsense-ui-kit 1.3.93 → 1.3.95

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.
@@ -5,6 +5,7 @@ declare type IPaginationProps = {
5
5
  itemsPerPage: number;
6
6
  onPageChange: (page: number) => void;
7
7
  onItemsPerPageChange: (itemsPerPage: number) => void;
8
+ itemsPerPageOptions?: number[];
8
9
  };
9
10
  declare const Pagination: React.FC<IPaginationProps>;
10
11
  export default Pagination;
package/dist/index.js CHANGED
@@ -8608,7 +8608,7 @@ var MultiSelectDropdown = function MultiSelectDropdown(_ref32) {
8608
8608
  };
8609
8609
  var SELECT_ALL_VALUE = '__SELECT_ALL__';
8610
8610
  var computedOptions = React__default.useMemo(function () {
8611
- if (!selectAllOption) return options;
8611
+ if (!selectAllOption || options.length === 0) return options;
8612
8612
  return [{
8613
8613
  value: SELECT_ALL_VALUE,
8614
8614
  labelText: selectAllLabel
@@ -10585,7 +10585,9 @@ var Pagination = function Pagination(_ref4) {
10585
10585
  currentPage = _ref4.currentPage,
10586
10586
  itemsPerPage = _ref4.itemsPerPage,
10587
10587
  onPageChange = _ref4.onPageChange,
10588
- onItemsPerPageChange = _ref4.onItemsPerPageChange;
10588
+ onItemsPerPageChange = _ref4.onItemsPerPageChange,
10589
+ _ref4$itemsPerPageOpt = _ref4.itemsPerPageOptions,
10590
+ itemsPerPageOptions = _ref4$itemsPerPageOpt === void 0 ? [5, 10, 20] : _ref4$itemsPerPageOpt;
10589
10591
  var themeColors = useTheme();
10590
10592
  var _useTranslation = reactI18next.useTranslation(),
10591
10593
  t = _useTranslation.t;
@@ -10699,16 +10701,12 @@ var Pagination = function Pagination(_ref4) {
10699
10701
  onItemsPerPageChange(val);
10700
10702
  }
10701
10703
  },
10702
- options: [{
10703
- label: '5',
10704
- value: '5'
10705
- }, {
10706
- label: '10',
10707
- value: '10'
10708
- }, {
10709
- label: '20',
10710
- value: '20'
10711
- }],
10704
+ options: itemsPerPageOptions.map(function (option) {
10705
+ return {
10706
+ label: option.toString(),
10707
+ value: option.toString()
10708
+ };
10709
+ }),
10712
10710
  positionRef: containerRef,
10713
10711
  allowDeselect: false
10714
10712
  }))));