@megha-ui/react 1.3.29 → 1.3.31

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.
@@ -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, onDragEnd: () => setIsDragging(false), children: [draggable && colIndex === draggableIndex && (_jsx("div", { style: {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.3.29",
3
+ "version": "1.3.31",
4
4
  "description": "A collection of reusable UI components for React applications, built with TypeScript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",