@lanaco/lnc-react-ui 2.1.10 → 2.1.11

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/lib/index.esm.js CHANGED
@@ -6559,7 +6559,8 @@ var CheckboxLookup = function CheckboxLookup(props) {
6559
6559
  localization = props.localization,
6560
6560
  pagination = props.pagination,
6561
6561
  height = props.height,
6562
- width = props.width;
6562
+ width = props.width,
6563
+ displayedItemsCount = props.displayedItemsCount;
6563
6564
  var themeProps = {
6564
6565
  theme: theme,
6565
6566
  size: size,
@@ -6589,10 +6590,10 @@ var CheckboxLookup = function CheckboxLookup(props) {
6589
6590
  onChange(id, selectedItems);
6590
6591
  };
6591
6592
 
6592
- var pageCount = Math.round((options.length - 1) / 5);
6593
+ var pageCount = Math.floor(options.length / displayedItemsCount) + 1;
6593
6594
  var label = options.length === selectedOptions.length ? localization.DeselectAll || "Deselect all" : localization.SelectAll || "Select all";
6594
6595
 
6595
- var _options = pagination ? options.slice((page - 1) * 5, page * 5) : options;
6596
+ var _options = pagination ? options.slice((page - 1) * displayedItemsCount, page * displayedItemsCount) : options;
6596
6597
 
6597
6598
  return /*#__PURE__*/React__default.createElement(Container$k, _extends({}, themeProps, {
6598
6599
  className: className
@@ -6709,6 +6710,7 @@ CheckboxLookup.defaultProps = {
6709
6710
  style: "regular",
6710
6711
  itemId: "id",
6711
6712
  itemText: "code",
6713
+ displayedItemsCount: 5,
6712
6714
  localization: {
6713
6715
  SelectAll: "Select all",
6714
6716
  DeselectAll: "Deselect all"
@@ -6734,7 +6736,8 @@ CheckboxLookup.propTypes = {
6734
6736
  size: PropTypes.oneOf(["small", "medium", "large"]),
6735
6737
  style: PropTypes.oneOf(["regular", "toggle"]),
6736
6738
  label: PropTypes.string,
6737
- color: PropTypes.oneOf(["primary", "secondary", "success", "error", "warning", "gray"])
6739
+ color: PropTypes.oneOf(["primary", "secondary", "success", "error", "warning", "gray"]),
6740
+ displayedItemsCount: PropTypes.number
6738
6741
  };
6739
6742
 
6740
6743
  var moment$1 = {exports: {}};
package/lib/index.js CHANGED
@@ -6600,7 +6600,8 @@ var CheckboxLookup = function CheckboxLookup(props) {
6600
6600
  localization = props.localization,
6601
6601
  pagination = props.pagination,
6602
6602
  height = props.height,
6603
- width = props.width;
6603
+ width = props.width,
6604
+ displayedItemsCount = props.displayedItemsCount;
6604
6605
  var themeProps = {
6605
6606
  theme: theme,
6606
6607
  size: size,
@@ -6630,10 +6631,10 @@ var CheckboxLookup = function CheckboxLookup(props) {
6630
6631
  onChange(id, selectedItems);
6631
6632
  };
6632
6633
 
6633
- var pageCount = Math.round((options.length - 1) / 5);
6634
+ var pageCount = Math.floor(options.length / displayedItemsCount) + 1;
6634
6635
  var label = options.length === selectedOptions.length ? localization.DeselectAll || "Deselect all" : localization.SelectAll || "Select all";
6635
6636
 
6636
- var _options = pagination ? options.slice((page - 1) * 5, page * 5) : options;
6637
+ var _options = pagination ? options.slice((page - 1) * displayedItemsCount, page * displayedItemsCount) : options;
6637
6638
 
6638
6639
  return /*#__PURE__*/React__default['default'].createElement(Container$k, _extends__default['default']({}, themeProps, {
6639
6640
  className: className
@@ -6750,6 +6751,7 @@ CheckboxLookup.defaultProps = {
6750
6751
  style: "regular",
6751
6752
  itemId: "id",
6752
6753
  itemText: "code",
6754
+ displayedItemsCount: 5,
6753
6755
  localization: {
6754
6756
  SelectAll: "Select all",
6755
6757
  DeselectAll: "Deselect all"
@@ -6775,7 +6777,8 @@ CheckboxLookup.propTypes = {
6775
6777
  size: PropTypes__default['default'].oneOf(["small", "medium", "large"]),
6776
6778
  style: PropTypes__default['default'].oneOf(["regular", "toggle"]),
6777
6779
  label: PropTypes__default['default'].string,
6778
- color: PropTypes__default['default'].oneOf(["primary", "secondary", "success", "error", "warning", "gray"])
6780
+ color: PropTypes__default['default'].oneOf(["primary", "secondary", "success", "error", "warning", "gray"]),
6781
+ displayedItemsCount: PropTypes__default['default'].number
6779
6782
  };
6780
6783
 
6781
6784
  var moment$1 = {exports: {}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "2.1.10",
3
+ "version": "2.1.11",
4
4
  "description": "component library",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",