@megha-ui/react 1.2.165 → 1.2.167
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.
|
@@ -43,7 +43,7 @@ const file_saver_1 = require("file-saver");
|
|
|
43
43
|
const pagination_1 = __importDefault(require("./utils/pagination"));
|
|
44
44
|
const gridRow_1 = __importDefault(require("./utils/gridRow"));
|
|
45
45
|
const pagination_2 = require("./utils/pagination");
|
|
46
|
-
const gridHeader_1 =
|
|
46
|
+
const gridHeader_1 = __importDefault(require("./utils/gridHeader"));
|
|
47
47
|
const useSort_1 = require("./hooks/useSort");
|
|
48
48
|
const usePagination_1 = require("./hooks/usePagination");
|
|
49
49
|
const useBulkSelect_1 = require("./hooks/useBulkSelect");
|
|
@@ -359,19 +359,6 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
|
|
|
359
359
|
inputValue,
|
|
360
360
|
fixedFilterValues,
|
|
361
361
|
]);
|
|
362
|
-
// Reset uniqueSearch to reflect the current filteredData
|
|
363
|
-
// Ensures unique filters default to the latest visible values
|
|
364
|
-
(0, react_1.useEffect)(() => {
|
|
365
|
-
const updatedUniqueSearch = {};
|
|
366
|
-
gridColumns.forEach((column) => {
|
|
367
|
-
var _a;
|
|
368
|
-
if (column.uniqueDrop) {
|
|
369
|
-
const columnData = (0, gridHeader_1.getColumnData)(column.key, filteredData, (_a = column.dataType) !== null && _a !== void 0 ? _a : "string");
|
|
370
|
-
updatedUniqueSearch[column.key] = columnData;
|
|
371
|
-
}
|
|
372
|
-
});
|
|
373
|
-
setUniqueSearch(updatedUniqueSearch);
|
|
374
|
-
}, [filteredData, gridColumns]);
|
|
375
362
|
const recalculate = (_summariseKeys) => {
|
|
376
363
|
const filteredData = paginate ? paginatedData : sortedData;
|
|
377
364
|
let newSummariseDetails = summariseDetails;
|
|
@@ -767,6 +754,7 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
|
|
|
767
754
|
}, [filteredData, gridGroupBy, gridColumns]);
|
|
768
755
|
const handleSearch = (key, value, type) => {
|
|
769
756
|
setSearchQueries((prev) => (Object.assign(Object.assign({}, prev), { [key]: { text: value, type, operation: "and" } })));
|
|
757
|
+
setUniqueSearch((prev) => (Object.assign(Object.assign({}, prev), { [key]: [] })));
|
|
770
758
|
};
|
|
771
759
|
(0, react_1.useEffect)(() => {
|
|
772
760
|
const handleKeydown = (event) => {
|
package/package.json
CHANGED