@react-pakistan/util-functions 1.24.80 → 1.24.81

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.
@@ -13,6 +13,10 @@ exports.getAvailablePageLimits = void 0;
13
13
  var dynamic_page_limit_1 = require("./dynamic-page-limit");
14
14
  var getAvailablePageLimits = function (totalRecords) {
15
15
  var allOptions = [5, 10, 15, 25, 100];
16
+ // If totalRecords is less than the smallest option, return only the smallest option
17
+ if (totalRecords < allOptions[0]) {
18
+ return (0, dynamic_page_limit_1.dynamicPageLimit)([allOptions[0]]);
19
+ }
16
20
  // Get options less than or equal to totalRecords
17
21
  var lowerOptions = allOptions.filter(function (opt) { return opt < totalRecords; });
18
22
  // Find the next higher option
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.24.80",
3
+ "version": "1.24.81",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {