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)
|
|
271
|
-
|
|
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(() => {
|