@megha-ui/react 1.2.83 → 1.2.85
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.
|
@@ -22,7 +22,7 @@ const isUrl = (value) => {
|
|
|
22
22
|
}
|
|
23
23
|
return false;
|
|
24
24
|
};
|
|
25
|
-
const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRows, toggleRowSelection, columns, widthMode, index, rowKey, hasVerticalScroll, onRowClick, loading, groupBy, rowIndex, columnIndex, hlBorderColor, handleDragStart, handleDragOver, handleDrop, draggable, checkboxWrapper, hugColumnWidths, hugColumnHeights, alternateRowColor, isExpandable, expandedRow, ignoreRowSelect, locale, formatOptions }) => {
|
|
25
|
+
const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRows, toggleRowSelection, columns, widthMode, index, rowKey, hasVerticalScroll, onRowClick, loading, groupBy, rowIndex, columnIndex, hlBorderColor, handleDragStart, handleDragOver, handleDrop, draggable, checkboxWrapper, hugColumnWidths, hugColumnHeights, alternateRowColor, isExpandable, expandedRow, ignoreRowSelect, locale, formatOptions, }) => {
|
|
26
26
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
27
27
|
const [itemsAlign, setItemsAlign] = (0, react_1.useState)("stretch");
|
|
28
28
|
const handleRowClick = (0, react_1.useCallback)(() => {
|
|
@@ -69,6 +69,8 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
69
69
|
: cellData
|
|
70
70
|
? cellData
|
|
71
71
|
: "";
|
|
72
|
+
const draggableIndex = column.key === "actions" && colIndex === 0 ? 1 : 0;
|
|
73
|
+
console.log(column, colIndex, draggableIndex);
|
|
72
74
|
const cellUrl = cellData === null || cellData === void 0 ? void 0 : cellData.url;
|
|
73
75
|
const isHidden = column.overflowHidden;
|
|
74
76
|
if (!column.hidden && groupBy !== column.key) {
|
|
@@ -87,7 +89,7 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
87
89
|
? `1px solid ${hlBorderColor}`
|
|
88
90
|
: "", backgroundColor: alternateRowColor && (index + 1) % 2 === 0
|
|
89
91
|
? "var(--row-bg)"
|
|
90
|
-
: "var(--row-bg-even)" }), children: [draggable && colIndex ===
|
|
92
|
+
: "var(--row-bg-even)" }), children: [draggable && colIndex === draggableIndex && ((0, jsx_runtime_1.jsx)("div", { onDragStart: (e) => handleDragStart && handleDragStart(e, index), style: {
|
|
91
93
|
cursor: "grab",
|
|
92
94
|
margin: "0 0.25rem",
|
|
93
95
|
}, children: "\u2630" })), loading ? ((0, jsx_runtime_1.jsx)("div", { style: { width: column.width, height: rowHeight }, children: (0, jsx_runtime_1.jsx)(shimmer_1.default, { height: 32, width: column.width }) })) : ((0, jsx_runtime_1.jsx)("div", { className: (cellData === null || cellData === void 0 ? void 0 : cellData.className) || "", style: {
|
package/package.json
CHANGED