ar-design 0.2.41 → 0.2.43

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(() => {
@@ -1,5 +1,6 @@
1
1
  type Result<TResponse> = {
2
2
  response: TResponse;
3
+ __response__: Response;
3
4
  __ok__: boolean;
4
5
  __statusCode__: number;
5
6
  __statusText__: string;
@@ -98,6 +98,7 @@ class Service {
98
98
  }
99
99
  return {
100
100
  response: _response,
101
+ __response__: response,
101
102
  __ok__: response.ok,
102
103
  __statusCode__: response.status,
103
104
  __statusText__: response.statusText,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ar-design",
3
- "version": "0.2.41",
3
+ "version": "0.2.43",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",