jclib-ui 1.0.252 → 1.0.253

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.
@@ -23796,20 +23796,18 @@ function ModalFilter({
23796
23796
  ] }) })
23797
23797
  ] });
23798
23798
  }
23799
+ const LIMIT_DEFAULT = 16;
23799
23800
  function Paginacao({
23800
23801
  pages,
23801
23802
  page,
23802
23803
  setPage,
23803
- limitDefault = 16,
23804
- limit = 16,
23804
+ limitDefault = LIMIT_DEFAULT,
23805
+ limit = LIMIT_DEFAULT,
23805
23806
  setLimit,
23806
23807
  align = "center"
23807
23808
  }) {
23808
- const [limits, setLimits] = useState([7, limitDefault, 30, 50, 100]);
23809
+ const [limits] = useState([7, limitDefault, 30, 50, 100].sort((a2, b2) => a2 - b2));
23809
23810
  const hasLimit = setLimit !== void 0 && limit !== void 0 && limitDefault !== void 0;
23810
- if (hasLimit && !limits.includes(limitDefault)) {
23811
- setLimits([...limits, limitDefault].sort((a2, b2) => a2 - b2));
23812
- }
23813
23811
  function updatePage(newPage) {
23814
23812
  var _a;
23815
23813
  if (newPage !== page && newPage >= 1 && newPage <= pages) {