@megha-ui/react 1.2.89 → 1.2.91
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,12 +43,14 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
43
43
|
: "stretch");
|
|
44
44
|
}, [item]);
|
|
45
45
|
(0, react_1.useEffect)(() => {
|
|
46
|
-
|
|
46
|
+
let _dragIndex = 0;
|
|
47
47
|
if (draggable && columns.length > 0) {
|
|
48
48
|
if (columns[0].key === "actions") {
|
|
49
|
-
|
|
49
|
+
_dragIndex = 1;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
console.log(draggable, columns, _dragIndex);
|
|
53
|
+
setDraggableIndex(_dragIndex);
|
|
52
54
|
}, [columns]);
|
|
53
55
|
return isExpandable &&
|
|
54
56
|
expandedRow === item.id.value &&
|
|
@@ -96,7 +98,7 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
96
98
|
? `1px solid ${hlBorderColor}`
|
|
97
99
|
: "", backgroundColor: alternateRowColor && (index + 1) % 2 === 0
|
|
98
100
|
? "var(--row-bg)"
|
|
99
|
-
: "var(--row-bg-even)" }), children: [draggable && colIndex === draggableIndex && ((0, jsx_runtime_1.jsx)("div", { onDragStart: (e) => handleDragStart && handleDragStart(e, index), style: {
|
|
101
|
+
: "var(--row-bg-even)" }), children: [draggable && colIndex === draggableIndex && ((0, jsx_runtime_1.jsx)("div", { onDragStart: (e) => handleDragStart && handleDragStart(e, index), id: `drag-index-${draggableIndex}`, style: {
|
|
100
102
|
cursor: "grab",
|
|
101
103
|
margin: "0 0.25rem",
|
|
102
104
|
}, 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