nillud-data-table 1.2.4 → 1.2.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.
Files changed (2) hide show
  1. package/dist/index.js +4 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -477,10 +477,10 @@ var DataTable = forwardRef(({
477
477
  return processedData.slice(start, start + paginationSize);
478
478
  }, [processedData, paginationPage, paginationSize]);
479
479
  useEffect2(() => {
480
- if (!isInitialLoad) {
481
- setPaginationPage(0);
482
- }
483
- }, [filters, sortBy, isInitialLoad]);
480
+ if (Object.values(filters).some((value) => {
481
+ return value !== null && value !== void 0 && value !== "";
482
+ })) setPaginationPage(0);
483
+ }, [filters]);
484
484
  useDebouncedEffect(() => {
485
485
  localStorage.setItem(`${tableName}-filters`, JSON.stringify(filters));
486
486
  }, [filters, tableName], 500);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nillud-data-table",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",