ar-design 0.2.40 → 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.
@@ -150,7 +150,7 @@ const Table = forwardRef(({ children, title, description, data, columns, actions
150
150
  // Eğer değer bir sayı veya string ise, aranan metinle eşleşip eşleşmediğini kontrol ediyoruz.
151
151
  return Object.entries(searchedText).every(([key, value]) => {
152
152
  const _itemValue = item[key];
153
- if (typeof _itemValue === "number" || typeof _itemValue === "string") {
153
+ if (typeof _itemValue === "number" || typeof _itemValue === "string" || typeof _itemValue === "boolean") {
154
154
  if (Array.isArray(value)) {
155
155
  if (value.length === 0)
156
156
  return true;
@@ -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.40",
3
+ "version": "0.2.42",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",