@megha-ui/react 1.2.159 → 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
|
-
|
|
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,
|
package/package.json
CHANGED