react-table-edit 0.3.2 → 0.3.4

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.
package/dist/index.js CHANGED
@@ -1589,12 +1589,10 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
1589
1589
  for (let i = 0; i < headerLevelRow; i++) {
1590
1590
  arrHeaderColumns.push([]);
1591
1591
  }
1592
- console.log(headerLevelRow);
1593
1592
  getNestedChildren(columns, arrHeaderColumns, arrContentColumns, 0, headerLevelRow);
1594
1593
  setHeaderColumns(arrHeaderColumns);
1595
- console.log(arrHeaderColumns);
1596
1594
  setContentColumns(arrContentColumns);
1597
- }, []);
1595
+ }, [columns]);
1598
1596
  const getNestedChildren = (array, arrHeaderColumns, arrContentColumns, level, maxLevelRow) => {
1599
1597
  array.forEach((item, index) => {
1600
1598
  const ele = { ...item, visible: item.invisibleDisable ? item.visible : contentColumns[index]?.visible ?? item.visible, rowspan: 1, index: 0 };
@@ -2604,7 +2602,7 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
2604
2602
  {
2605
2603
  className: (0, import_classnames10.default)("r-rowcell-div"),
2606
2604
  style: {
2607
- width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto"
2605
+ width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width
2608
2606
  },
2609
2607
  children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2610
2608
  "div",
@@ -2655,7 +2653,7 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
2655
2653
  left: col.fixedType === "left" ? objWidthFix[col.index ?? 0] : void 0,
2656
2654
  right: col.fixedType === "right" ? objWidthFix[col.index ?? 0] : void 0,
2657
2655
  width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2658
- minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto",
2656
+ minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2659
2657
  maxWidth: col.maxWidth
2660
2658
  },
2661
2659
  children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
@@ -2744,7 +2742,7 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
2744
2742
  ),
2745
2743
  style: {
2746
2744
  width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2747
- minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto",
2745
+ minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2748
2746
  top: `${indexParent * 42}px`,
2749
2747
  left: col.fixedType === "left" ? objWidthFix[col.index ?? 0] : void 0,
2750
2748
  right: col.fixedType === "right" ? objWidthFix[col.index ?? 0] : void 0,
@@ -2781,8 +2779,8 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
2781
2779
  style: {
2782
2780
  left: col.fixedType === "left" ? objWidthFix[indexCol] : void 0,
2783
2781
  right: col.fixedType === "right" ? objWidthFix[indexCol] : void 0,
2784
- width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto",
2785
- minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto",
2782
+ width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2783
+ minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2786
2784
  maxWidth: col.maxWidth,
2787
2785
  textAlign: col.textAlign ? col.textAlign : "left"
2788
2786
  },
package/dist/index.mjs CHANGED
@@ -1548,12 +1548,10 @@ var TableEdit = forwardRef2((props, ref) => {
1548
1548
  for (let i = 0; i < headerLevelRow; i++) {
1549
1549
  arrHeaderColumns.push([]);
1550
1550
  }
1551
- console.log(headerLevelRow);
1552
1551
  getNestedChildren(columns, arrHeaderColumns, arrContentColumns, 0, headerLevelRow);
1553
1552
  setHeaderColumns(arrHeaderColumns);
1554
- console.log(arrHeaderColumns);
1555
1553
  setContentColumns(arrContentColumns);
1556
- }, []);
1554
+ }, [columns]);
1557
1555
  const getNestedChildren = (array, arrHeaderColumns, arrContentColumns, level, maxLevelRow) => {
1558
1556
  array.forEach((item, index) => {
1559
1557
  const ele = { ...item, visible: item.invisibleDisable ? item.visible : contentColumns[index]?.visible ?? item.visible, rowspan: 1, index: 0 };
@@ -2563,7 +2561,7 @@ var TableEdit = forwardRef2((props, ref) => {
2563
2561
  {
2564
2562
  className: classnames6("r-rowcell-div"),
2565
2563
  style: {
2566
- width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto"
2564
+ width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width
2567
2565
  },
2568
2566
  children: /* @__PURE__ */ jsxs11(
2569
2567
  "div",
@@ -2614,7 +2612,7 @@ var TableEdit = forwardRef2((props, ref) => {
2614
2612
  left: col.fixedType === "left" ? objWidthFix[col.index ?? 0] : void 0,
2615
2613
  right: col.fixedType === "right" ? objWidthFix[col.index ?? 0] : void 0,
2616
2614
  width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2617
- minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto",
2615
+ minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2618
2616
  maxWidth: col.maxWidth
2619
2617
  },
2620
2618
  children: /* @__PURE__ */ jsx12(
@@ -2703,7 +2701,7 @@ var TableEdit = forwardRef2((props, ref) => {
2703
2701
  ),
2704
2702
  style: {
2705
2703
  width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2706
- minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto",
2704
+ minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2707
2705
  top: `${indexParent * 42}px`,
2708
2706
  left: col.fixedType === "left" ? objWidthFix[col.index ?? 0] : void 0,
2709
2707
  right: col.fixedType === "right" ? objWidthFix[col.index ?? 0] : void 0,
@@ -2740,8 +2738,8 @@ var TableEdit = forwardRef2((props, ref) => {
2740
2738
  style: {
2741
2739
  left: col.fixedType === "left" ? objWidthFix[indexCol] : void 0,
2742
2740
  right: col.fixedType === "right" ? objWidthFix[indexCol] : void 0,
2743
- width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto",
2744
- minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : "auto",
2741
+ width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2742
+ minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2745
2743
  maxWidth: col.maxWidth,
2746
2744
  textAlign: col.textAlign ? col.textAlign : "left"
2747
2745
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-table-edit",
3
3
  "license": "MIT",
4
- "version": "0.3.2",
4
+ "version": "0.3.4",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",