@yeverlibs/ds 1.0.9 → 1.0.12

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.
package/dist/index.js CHANGED
@@ -5358,8 +5358,12 @@ var Content = ({
5358
5358
  if (parts.length >= 3) {
5359
5359
  const [name, operator, value] = parts;
5360
5360
  const filter = filterOptions.find((f) => f.name === name && f.isSearchNew);
5361
- if (filter && (filter.operator === operator || filter.operator === "eq" && operator === "=")) {
5362
- newFilters[name] = value;
5361
+ if (filter) {
5362
+ const filterOperator = filter.operator || "like";
5363
+ const isOperatorMatch = filterOperator === operator || filterOperator === "eq" && (operator === "=" || operator === "like") || filterOperator === "like" && (operator === "like" || operator === "eq");
5364
+ if (isOperatorMatch) {
5365
+ newFilters[name] = value;
5366
+ }
5363
5367
  }
5364
5368
  }
5365
5369
  });
@@ -6222,14 +6226,16 @@ var TableContent = ({
6222
6226
  }, [pathname]);
6223
6227
  React107.useEffect(() => {
6224
6228
  if (!pathname) return;
6229
+ let shouldPaginate = false;
6225
6230
  if (searchParams?.has("perPage")) {
6226
6231
  setItemsPerPage(perPage);
6227
- nextReplaceUrl("perPage", String(perPage), pathname);
6228
- handlePagination();
6232
+ shouldPaginate = true;
6229
6233
  }
6230
6234
  if (searchParams?.has("search")) {
6231
6235
  setSearchQuery(searchParam);
6232
- nextReplaceUrl("search", searchParam, pathname);
6236
+ shouldPaginate = true;
6237
+ }
6238
+ if (shouldPaginate) {
6233
6239
  handlePagination();
6234
6240
  }
6235
6241
  }, [perPage, searchParam]);
@@ -6248,9 +6254,8 @@ var TableContent = ({
6248
6254
  };
6249
6255
  const handleSearchSubmit = () => {
6250
6256
  if (!pathname) return;
6251
- Promise.all([nextReplaceUrl("search", searchQuery, pathname), nextReplaceUrl("page", "1", pathname)]).then(() => {
6252
- handlePagination();
6253
- });
6257
+ nextReplaceUrl("search", searchQuery, pathname);
6258
+ nextReplaceUrl("page", "1", pathname);
6254
6259
  };
6255
6260
  const handleClickOutside = React107.useCallback((event) => {
6256
6261
  if (actionMenuRef.current && !actionMenuRef.current.contains(event.target)) {