@megha-ui/react 1.2.137 → 1.2.139
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.
|
@@ -38,6 +38,7 @@ const useSort = (data, columns, uniqueSearch, multiSorting, withAscii) => {
|
|
|
38
38
|
let returnData = [...data];
|
|
39
39
|
const _sortQueries = sortQueries;
|
|
40
40
|
returnData = returnData.sort(hierarchicalSort(Object.keys(_sortQueries), Object.values(_sortQueries)));
|
|
41
|
+
console.log(returnData, _sortQueries);
|
|
41
42
|
returnData = returnData.filter((data) => {
|
|
42
43
|
return keys.every((key) => {
|
|
43
44
|
if (uniqueSearch[key].length > 0) {
|
|
@@ -58,6 +58,7 @@ const dropdown_1 = __importDefault(require("../dropdown"));
|
|
|
58
58
|
const loader_1 = __importDefault(require("../loader"));
|
|
59
59
|
const button_1 = __importDefault(require("../button"));
|
|
60
60
|
const tb_1 = require("react-icons/tb");
|
|
61
|
+
const commonService_1 = require("../../services/commonService");
|
|
61
62
|
const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable = true, paginate, rowsPerPageOptions = [10, 20, 50, 100], defaultRowsPerPage = 100, widthMode = "custom", bulkSelect = false, cellBorder = false, rowHeight = 38, onRowClick, rowCount = false, rowBorder = true, showMenu = false, search = false, defaultSearchOperation = "contains", gridBorder = false, isLoading = false, rowTopBorder, rowBottomBorder, rowLeftBorder, rowRightBorder, headerBackground = "var(--row-header-bg)", headerTopBorder = "none", headerBottomBorder = "none", SettingIcon, ExportIcon, ignoredExportItems = ["action", "actions"], borderColor = "#dbdfe9", updateColumns, showHideAvailable = false, columnSearchOutside = false, multiSorting = false, exportAvailable = false, exportableFileName = "", groupBy, updateGroupBy, rowKey = "id", hlBorderColor = "black", selectedRow, selectedRowStyle = {
|
|
62
63
|
borderLeft: "0.5rem solid #d9d9d9",
|
|
63
64
|
}, defaultSort, noKeyEvents = true, customOperation, hasCustomOperation, globalSearch, headerDropdownIndex, draggable = false, resizable = false, updateGridData, widthUnits, checkboxWrapper, ignoreHugContent = false, setRendered, isSummarise = true, fullScreenAvailable = true, defaultGroupOpen, alternateRowColor = true, activeCalculateColor = "#2377BA", calculatetextColor = "#fff", actionsKey = "actions", saveAsNewView = false, handleSaveAsView, saveAsViewIcon, filterData, chipColor = "#ccc", withAscii = false, propSummariseKeys, SummariseIcon, summarizeColor = "black", isExpandable = false, expandedRow, extraRow, selectedCheckBox, setSelectedCheckbox, ignoreRowSelect, setOpenedRows, openedRows, getLoadingState, globalSearchOpen = false, updateFixedFilterValues = (fixedFilterValues) => {
|
|
@@ -847,7 +848,7 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
|
|
|
847
848
|
const exportableJson = sortedData.map((item) => {
|
|
848
849
|
const newItem = filterColumns.reduce((acc, column) => {
|
|
849
850
|
if (!ignoredExportItems.includes(column.key) && item[column.key]) {
|
|
850
|
-
acc[column.key] = item[column.key].value;
|
|
851
|
+
acc[column.key] = (0, commonService_1.formatValue)(item[column.key].value, locale, formatOptions);
|
|
851
852
|
}
|
|
852
853
|
return acc;
|
|
853
854
|
}, {});
|
package/package.json
CHANGED