@megha-ui/react 1.2.160 → 1.2.162

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,19 @@ 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
+ console.log(item[column.key], uniqueSearch[column.key]);
355
+ if (item[column.key] && !prev[column.key].includes(item[column.key].value)) {
356
+ prev[column.key].push(item[column.key].value);
357
+ }
358
+ });
359
+ }
360
+ });
361
+ return prev;
362
+ });
351
363
  return _filteredData;
352
364
  }, [
353
365
  data,
@@ -358,17 +370,6 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
358
370
  inputValue,
359
371
  fixedFilterValues,
360
372
  ]);
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
373
  const recalculate = (_summariseKeys) => {
373
374
  const filteredData = paginate ? paginatedData : sortedData;
374
375
  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.162",
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",