@megha-ui/react 1.2.774 → 1.2.776
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.
|
@@ -164,6 +164,12 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
164
164
|
if (filterValue.length === 0)
|
|
165
165
|
return true;
|
|
166
166
|
const cellValue = ((_b = (_a = item[key]) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.toString()) || "";
|
|
167
|
+
const col = columns.find((item) => key === item.key);
|
|
168
|
+
console.log({
|
|
169
|
+
col,
|
|
170
|
+
isArrayString: col === null || col === void 0 ? void 0 : col.isArrayString,
|
|
171
|
+
valueArray: item[key].isArrayString
|
|
172
|
+
});
|
|
167
173
|
return filterValue.includes(cellValue);
|
|
168
174
|
})
|
|
169
175
|
: true);
|
|
@@ -1423,7 +1429,7 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
1423
1429
|
updateFixedFilterValues(updatedValues);
|
|
1424
1430
|
}
|
|
1425
1431
|
}
|
|
1426
|
-
: undefined, style: { width: "14rem" }, isSort: column.fixedFilterOrder ? false : undefined, isClear: true, searchEnabled: true, dropdownListWidth: "max-content", className: "h-8 flex-1", isMultiple: column.fixedFilter === "multi-select" }) }, column.key));
|
|
1432
|
+
: undefined, style: { width: "14rem" }, isSort: column.fixedFilterOrder ? false : undefined, isClear: true, searchEnabled: true, dropdownListWidth: "max-content", className: "h-8 flex-1", width: "100%", isMultiple: column.fixedFilter === "multi-select" }) }, column.key));
|
|
1427
1433
|
}
|
|
1428
1434
|
return null;
|
|
1429
1435
|
}), _jsx("div", { className: "flex-1 h-2" }), isSummarise && (_jsx("div", { onClick: () => setSummariseAvailable((prev) => !prev), style: {
|
|
@@ -1529,10 +1535,14 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
1529
1535
|
}, children: _jsx(Loader, { size: 32 }) })), _jsx("div", { id: "table-body", children: gridGroupBy !== "" ? (_jsx(GroupedGridDetails, { locale: locale, formatOptions: formatOptions, groupedData: groupedData, rowOpened: rowOpened, startIndex: startIndex, endIndex: endIndex, alternateRowColor: alternateRowColor, updateRowOpened: updateRowOpened, columnWidths: columnWidths, columnHeights: columnHeights, groupBy: groupBy, widthMode: widthMode, rowKey: rowKey, rowHeight: rowHeight, headerBackground: headerBackground, isSummarise: summariseAvailable, gridGroupBy: gridGroupBy, rowStyle: rowStyle, sortable: sortable, cellStyle: cellStyle, summariseKeys: summariseKeys, summariseDetails: summariseDetails, activeCalculateColor: activeCalculateColor, gridRef: gridRef, setCalculatePosition: setCalculatePosition, calculatePosition: calculatePosition, calculatetextColor: calculatetextColor, setCalculateVisible: setCalculateVisible, calculateVisible: calculateVisible, summariseDisplay: summariseDisplay, recalculate: recalculate, selectedRowStyle: selectedRowStyle, isLoading: isLoading, selectedRow: selectedRow, onRowClick: onRowClick, gridColumns: gridColumns, bulkSelect: bulkSelect, selectedRows: selectedRows, toggleRowSelection: toggleRowSelection, hasVerticalScroll: hasVerticalScroll, setColumnWidths: setColumnWidths, setColumnHeights: setColumnHeights, actionsKey: actionsKey })) : (_jsxs(_Fragment, { children: [tableData.map((item, index) => {
|
|
1530
1536
|
var _a, _b, _c, _d, _e, _f;
|
|
1531
1537
|
if (paginate) {
|
|
1532
|
-
return (_jsx(GridRow, { item: item, index: index, rowStyle: Object.assign(Object.assign({}, rowStyle), (selectedRow === ((_a = item.id) === null || _a === void 0 ? void 0 : _a.value)
|
|
1538
|
+
return (_jsx(GridRow, { item: item, index: index, rowStyle: Object.assign(Object.assign({}, rowStyle), (selectedRow === ((_a = item.id) === null || _a === void 0 ? void 0 : _a.value)
|
|
1539
|
+
? selectedRowStyle
|
|
1540
|
+
: {})), handleDragStart: handleDragStart, handleDragOver: handleDragOver, handleDrop: handleDrop, draggable: draggable, cellStyle: cellStyle, rowHeight: rowHeight, alternateRowColor: alternateRowColor, bulkSelect: bulkSelect, selectedRows: selectedRows ? selectedRows : new Set([""]), ignoreRowSelect: ignoreRowSelect ? ignoreRowSelect : new Set([""]), toggleRowSelection: toggleRowSelection, columns: gridColumns, widthMode: widthMode, hasVerticalScroll: hasVerticalScroll, onRowClick: onRowClick, loading: isLoading, groupBy: gridGroupBy, rowKey: rowKey, rowIndex: rowIndex, columnIndex: columnIndex, hlBorderColor: hlBorderColor, hugColumnWidths: columnWidths, hugColumnHeights: columnHeights, expandedRow: expandedRow, isExpandable: isExpandable, checkboxWrapper: checkboxWrapper, locale: locale, formatOptions: formatOptions, actionsKey: actionsKey }, String((_c = (_b = item.id) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : index)));
|
|
1533
1541
|
}
|
|
1534
1542
|
else if (index >= startIndex && index <= endIndex) {
|
|
1535
|
-
return (_jsx(GridRow, { item: item, index: index, rowStyle: Object.assign(Object.assign({}, rowStyle), (selectedRow === ((_d = item.id) === null || _d === void 0 ? void 0 : _d.value)
|
|
1543
|
+
return (_jsx(GridRow, { item: item, index: index, rowStyle: Object.assign(Object.assign({}, rowStyle), (selectedRow === ((_d = item.id) === null || _d === void 0 ? void 0 : _d.value)
|
|
1544
|
+
? selectedRowStyle
|
|
1545
|
+
: {})), handleDragStart: handleDragStart, handleDragOver: handleDragOver, handleDrop: handleDrop, draggable: draggable, cellStyle: cellStyle, rowHeight: rowHeight, alternateRowColor: alternateRowColor, bulkSelect: bulkSelect, selectedRows: selectedRows ? selectedRows : new Set([""]), ignoreRowSelect: ignoreRowSelect ? ignoreRowSelect : new Set([""]), toggleRowSelection: toggleRowSelection, columns: gridColumns, widthMode: widthMode, hasVerticalScroll: hasVerticalScroll, onRowClick: onRowClick, loading: isLoading, groupBy: gridGroupBy, rowKey: rowKey, rowIndex: rowIndex, columnIndex: columnIndex, hlBorderColor: hlBorderColor, hugColumnWidths: columnWidths, hugColumnHeights: columnHeights, expandedRow: expandedRow, isExpandable: isExpandable, checkboxWrapper: checkboxWrapper, locale: locale, formatOptions: formatOptions, actionsKey: actionsKey }, String((_f = (_e = item.id) === null || _e === void 0 ? void 0 : _e.value) !== null && _f !== void 0 ? _f : index)));
|
|
1536
1546
|
}
|
|
1537
1547
|
}), extraRow && extraRow, tableData.length === 0 && typeof extraRow === "undefined" && (_jsx("div", { style: {
|
|
1538
1548
|
width: "100%",
|
package/package.json
CHANGED