@megha-ui/react 1.2.160 → 1.2.161

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.
@@ -347,7 +347,18 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
347
347
  : "";
348
348
  return value.toLowerCase().includes(query.toLowerCase());
349
349
  }));
350
- console.log({ _filteredData });
350
+ setUniqueSearch(prev => {
351
+ filterColumns.forEach(column => {
352
+ if (prev[column.key] && Array.isArray(prev[column.key]) && prev[column.key].length > 0) {
353
+ _filteredData.forEach(item => {
354
+ if (item[column.key] && !prev[column.key].includes(item[column.key].value)) {
355
+ prev[column.key].push(item[column.key].value);
356
+ }
357
+ });
358
+ }
359
+ });
360
+ return prev;
361
+ });
351
362
  return _filteredData;
352
363
  }, [
353
364
  data,
@@ -358,17 +369,6 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
358
369
  inputValue,
359
370
  fixedFilterValues,
360
371
  ]);
361
- (0, react_1.useEffect)(() => {
362
- console.log("Something is changed");
363
- }, [
364
- data,
365
- searchQueries,
366
- filterColumns,
367
- globalInputSearch,
368
- globalSearchOp,
369
- inputValue,
370
- fixedFilterValues,
371
- ]);
372
372
  const recalculate = (_summariseKeys) => {
373
373
  const filteredData = paginate ? paginatedData : sortedData;
374
374
  let newSummariseDetails = summariseDetails;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.160",
3
+ "version": "1.2.161",
4
4
  "description": "A collection of reusable UI components for React applications, built with TypeScript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",