ar-design 0.2.41 → 0.2.42

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.
@@ -267,8 +267,14 @@ const Table = forwardRef(({ children, title, description, data, columns, actions
267
267
  }, [previousSelections]);
268
268
  useEffect(() => {
269
269
  if (config?.isServerSide && searchedParams) {
270
- const query = new URLSearchParams(_searchedParams).toString();
271
- searchedParams(_searchedParams, query);
270
+ const query = new URLSearchParams(_searchedParams);
271
+ columns.forEach((column) => {
272
+ const getParamsLength = column.filters?.length;
273
+ const searchedParamLength = Array.from(_searchedParams?.[column.key] ?? []).length;
274
+ if (getParamsLength === searchedParamLength)
275
+ query.delete(column.key);
276
+ });
277
+ searchedParams(_searchedParams, query.toString());
272
278
  }
273
279
  }, [_searchedParams]);
274
280
  useEffect(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ar-design",
3
- "version": "0.2.41",
3
+ "version": "0.2.42",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",