@megha-ui/react 1.3.29 → 1.3.32
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.
|
@@ -362,6 +362,7 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
|
|
|
362
362
|
}
|
|
363
363
|
return text;
|
|
364
364
|
};
|
|
365
|
+
console.log({ options });
|
|
365
366
|
return (_jsxs("div", { style: {
|
|
366
367
|
width: width !== null && width !== void 0 ? width : "max-content",
|
|
367
368
|
marginBottom,
|
|
@@ -1094,6 +1094,7 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
1094
1094
|
setDraggingIndex(null);
|
|
1095
1095
|
}
|
|
1096
1096
|
else {
|
|
1097
|
+
console.log({ data });
|
|
1097
1098
|
const updatedItems = [...data];
|
|
1098
1099
|
const [draggedItem] = updatedItems.splice(draggingIndex, 1);
|
|
1099
1100
|
updatedItems.splice(dropIndex, 0, draggedItem);
|
|
@@ -204,11 +204,16 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
204
204
|
? `1px solid ${hlBorderColor}`
|
|
205
205
|
: "", backgroundColor: alternateRowColor && (index + 1) % 2 === 0
|
|
206
206
|
? "var(--row-bg)"
|
|
207
|
-
: "var(--row-bg-even)" }), onClick: () => handleRowClick(column), draggable: draggable,
|
|
207
|
+
: "var(--row-bg-even)" }), onClick: () => handleRowClick(column), draggable: draggable, onDragStart: (e) => {
|
|
208
|
+
if (!draggable)
|
|
209
|
+
return;
|
|
210
|
+
handleDragStart && handleDragStart(e, index);
|
|
211
|
+
setIsDragging(true);
|
|
212
|
+
}, onDragOver: (e) => handleDragOver && handleDragOver(e), onDrop: (e) => {
|
|
213
|
+
handleDrop && handleDrop(e, index);
|
|
214
|
+
setIsDragging(false);
|
|
215
|
+
}, onDragEnd: () => setIsDragging(false), children: [draggable && colIndex === draggableIndex && (_jsx("div", { style: {
|
|
208
216
|
cursor: "grab",
|
|
209
|
-
}, onDragStart: (e) => {
|
|
210
|
-
handleDragStart && handleDragStart(e, index);
|
|
211
|
-
setIsDragging(true);
|
|
212
217
|
}, children: _jsx(MdDragIndicator, { size: "1.25rem" }) })), loading ? (_jsx("div", { style: { height: rowHeight }, children: _jsx(Shimmer, { height: 32, width: column.width }) })) : (_jsx("div", { className: (cellData === null || cellData === void 0 ? void 0 : cellData.className) || "", style: {
|
|
213
218
|
display: "flex",
|
|
214
219
|
alignItems: "center", // Vertically center content within the cell
|
package/package.json
CHANGED