@yeverlibs/ds 1.0.13 → 1.1.0

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/index.js CHANGED
@@ -6229,10 +6229,12 @@ var TableContent = ({
6229
6229
  let shouldPaginate = false;
6230
6230
  if (searchParams?.has("perPage")) {
6231
6231
  setItemsPerPage(perPage);
6232
+ nextReplaceUrl("perPage", String(perPage), pathname);
6232
6233
  shouldPaginate = true;
6233
6234
  }
6234
6235
  if (searchParams?.has("search")) {
6235
6236
  setSearchQuery(searchParam);
6237
+ nextReplaceUrl("search", searchParam, pathname);
6236
6238
  shouldPaginate = true;
6237
6239
  }
6238
6240
  if (shouldPaginate) {
@@ -6533,12 +6535,8 @@ var TableContent = ({
6533
6535
  const newPerPage = Number(e.target.value);
6534
6536
  setItemsPerPage(newPerPage);
6535
6537
  setCurrentPage(RESET_PAGE);
6536
- Promise.all([
6537
- nextReplaceUrl("page", "1", pathname),
6538
- nextReplaceUrl("perPage", String(newPerPage), pathname)
6539
- ]).then(() => {
6540
- handlePagination();
6541
- });
6538
+ nextReplaceUrl("page", "1", pathname);
6539
+ nextReplaceUrl("perPage", String(newPerPage), pathname);
6542
6540
  },
6543
6541
  className: "block h-8 w-full cursor-pointer appearance-none rounded border border-gray-300 bg-white p-2 text-sm leading-tight text-gray-700 focus:border-gray-500 focus:bg-white focus:outline-none",
6544
6542
  children: [