@hybr1d-tech/charizard 0.7.4 → 0.7.5

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/dist/hybr1d-ui.js CHANGED
@@ -8712,8 +8712,9 @@ function ho({ paginationConfig: e }) {
8712
8712
  }, [e.page]), f.useEffect(() => {
8713
8713
  i.setCount((o == null ? void 0 : o.total_items) || 0);
8714
8714
  }, [o == null ? void 0 : o.total_items, a]), f.useEffect(() => {
8715
- i.setPage(1), i.setPageSize(e.limit);
8716
- }, [a]);
8715
+ const d = Math.ceil(((o == null ? void 0 : o.total_items) || 0) / e.limit);
8716
+ e.page + 1 > d && i.setPage(1), i.setPageSize(e.limit);
8717
+ }, [a, o == null ? void 0 : o.total_items]);
8717
8718
  const c = o != null && o.page_no ? o.page_no : 0, r = c * ((o == null ? void 0 : o.items_on_page) || 0) + 1, u = Math.min(
8718
8719
  c * ((o == null ? void 0 : o.items_on_page) || 0) + a,
8719
8720
  (o == null ? void 0 : o.total_items) || 0