react-table-edit 0.1.8 → 0.2.0

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
@@ -65,7 +65,7 @@ var ReactInput = (props) => {
65
65
  setValue("");
66
66
  setSearchTerm("");
67
67
  };
68
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
68
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [
69
69
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
70
70
  import_reactstrap.Input,
71
71
  {
@@ -80,7 +80,7 @@ var ReactInput = (props) => {
80
80
  }
81
81
  ),
82
82
  value ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_becoxy_icons.X, { className: "input__clear-icon", onClick: handelClear, strokeWidth: 3, fontSize: 16 }) : ""
83
- ] }) });
83
+ ] });
84
84
  };
85
85
  var react_input_default = ReactInput;
86
86
 
@@ -1569,7 +1569,7 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
1569
1569
  }
1570
1570
  };
1571
1571
  const searchTemplate = () => {
1572
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react12.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "me-50", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1572
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react12.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "me-50 r-search", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1573
1573
  react_input_default,
1574
1574
  {
1575
1575
  style: { width: "230px" },
@@ -2308,7 +2308,7 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
2308
2308
  }, [selectedItem]);
2309
2309
  const renderContentCol = (col, row, indexRow, indexCol, isSelected) => {
2310
2310
  if (col.field === "command") {
2311
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2311
+ return col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2312
2312
  "td",
2313
2313
  {
2314
2314
  className: (0, import_classnames9.default)(
@@ -2326,7 +2326,7 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
2326
2326
  `col-${indexRow}-${indexCol}`
2327
2327
  );
2328
2328
  } else if (col.field === "#") {
2329
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2329
+ return col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2330
2330
  "td",
2331
2331
  {
2332
2332
  className: (0, import_classnames9.default)(`r-rowcell p-0 cursor-pointer fix-${col.fixedType}`, { "cell-fixed": col.fixedType }, { "r-active": isSelected && editDisable || indexFocus === indexRow }),
@@ -2532,7 +2532,7 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
2532
2532
  {
2533
2533
  style: {
2534
2534
  height: `${(col.rowspan ?? 1) * 42}px`,
2535
- justifyContent: col.textAlign ?? "center"
2535
+ justifyContent: col.textAlign ?? "left"
2536
2536
  },
2537
2537
  className: (0, import_classnames9.default)("r-headercell-div"),
2538
2538
  children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
@@ -2541,7 +2541,7 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
2541
2541
  checked: selectedRows?.length >= dataSource?.length && dataSource?.length > 0,
2542
2542
  type: "checkbox",
2543
2543
  className: (0, import_classnames9.default)("cursor-pointer", { "d-none": !isMulti }),
2544
- style: { textAlign: col.textAlign ?? "center", marginTop: 6 },
2544
+ style: { textAlign: col.textAlign ?? "left", marginTop: 6 },
2545
2545
  onChange: (e) => {
2546
2546
  if (selectEnable) {
2547
2547
  if (e.target.checked) {
@@ -2587,7 +2587,7 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
2587
2587
  title: t(col.headerText ?? ""),
2588
2588
  style: {
2589
2589
  height: `${(col.rowspan ?? 1) * 42}px`,
2590
- justifyContent: col.textAlign ?? "center"
2590
+ justifyContent: col.textAlign ?? "left"
2591
2591
  },
2592
2592
  className: "r-headercell-div",
2593
2593
  children: t(col.headerText ?? "")
@@ -2625,7 +2625,7 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
2625
2625
  title: t(col.headerText ?? ""),
2626
2626
  style: {
2627
2627
  height: `${(col.rowspan ?? 1) * 42}px`,
2628
- justifyContent: col.textAlign ?? "center"
2628
+ justifyContent: col.textAlign ?? "left"
2629
2629
  },
2630
2630
  className: "r-headercell-div",
2631
2631
  children: t(col.headerText ?? "")
package/dist/index.mjs CHANGED
@@ -21,7 +21,7 @@ var ReactInput = (props) => {
21
21
  setValue("");
22
22
  setSearchTerm("");
23
23
  };
24
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { children: [
24
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
25
25
  /* @__PURE__ */ jsx(
26
26
  Input,
27
27
  {
@@ -36,7 +36,7 @@ var ReactInput = (props) => {
36
36
  }
37
37
  ),
38
38
  value ? /* @__PURE__ */ jsx(X, { className: "input__clear-icon", onClick: handelClear, strokeWidth: 3, fontSize: 16 }) : ""
39
- ] }) });
39
+ ] });
40
40
  };
41
41
  var react_input_default = ReactInput;
42
42
 
@@ -1543,7 +1543,7 @@ var TableEdit = forwardRef2((props, ref) => {
1543
1543
  }
1544
1544
  };
1545
1545
  const searchTemplate = () => {
1546
- return /* @__PURE__ */ jsx12(Fragment12, { children: /* @__PURE__ */ jsx12("div", { className: "me-50", children: /* @__PURE__ */ jsx12(
1546
+ return /* @__PURE__ */ jsx12(Fragment12, { children: /* @__PURE__ */ jsx12("div", { className: "me-50 r-search", children: /* @__PURE__ */ jsx12(
1547
1547
  react_input_default,
1548
1548
  {
1549
1549
  style: { width: "230px" },
@@ -2282,7 +2282,7 @@ var TableEdit = forwardRef2((props, ref) => {
2282
2282
  }, [selectedItem]);
2283
2283
  const renderContentCol = (col, row, indexRow, indexCol, isSelected) => {
2284
2284
  if (col.field === "command") {
2285
- return /* @__PURE__ */ jsx12(
2285
+ return col.visible !== false && /* @__PURE__ */ jsx12(
2286
2286
  "td",
2287
2287
  {
2288
2288
  className: classnames5(
@@ -2300,7 +2300,7 @@ var TableEdit = forwardRef2((props, ref) => {
2300
2300
  `col-${indexRow}-${indexCol}`
2301
2301
  );
2302
2302
  } else if (col.field === "#") {
2303
- return /* @__PURE__ */ jsx12(
2303
+ return col.visible !== false && /* @__PURE__ */ jsx12(
2304
2304
  "td",
2305
2305
  {
2306
2306
  className: classnames5(`r-rowcell p-0 cursor-pointer fix-${col.fixedType}`, { "cell-fixed": col.fixedType }, { "r-active": isSelected && editDisable || indexFocus === indexRow }),
@@ -2506,7 +2506,7 @@ var TableEdit = forwardRef2((props, ref) => {
2506
2506
  {
2507
2507
  style: {
2508
2508
  height: `${(col.rowspan ?? 1) * 42}px`,
2509
- justifyContent: col.textAlign ?? "center"
2509
+ justifyContent: col.textAlign ?? "left"
2510
2510
  },
2511
2511
  className: classnames5("r-headercell-div"),
2512
2512
  children: /* @__PURE__ */ jsx12(
@@ -2515,7 +2515,7 @@ var TableEdit = forwardRef2((props, ref) => {
2515
2515
  checked: selectedRows?.length >= dataSource?.length && dataSource?.length > 0,
2516
2516
  type: "checkbox",
2517
2517
  className: classnames5("cursor-pointer", { "d-none": !isMulti }),
2518
- style: { textAlign: col.textAlign ?? "center", marginTop: 6 },
2518
+ style: { textAlign: col.textAlign ?? "left", marginTop: 6 },
2519
2519
  onChange: (e) => {
2520
2520
  if (selectEnable) {
2521
2521
  if (e.target.checked) {
@@ -2561,7 +2561,7 @@ var TableEdit = forwardRef2((props, ref) => {
2561
2561
  title: t(col.headerText ?? ""),
2562
2562
  style: {
2563
2563
  height: `${(col.rowspan ?? 1) * 42}px`,
2564
- justifyContent: col.textAlign ?? "center"
2564
+ justifyContent: col.textAlign ?? "left"
2565
2565
  },
2566
2566
  className: "r-headercell-div",
2567
2567
  children: t(col.headerText ?? "")
@@ -2599,7 +2599,7 @@ var TableEdit = forwardRef2((props, ref) => {
2599
2599
  title: t(col.headerText ?? ""),
2600
2600
  style: {
2601
2601
  height: `${(col.rowspan ?? 1) * 42}px`,
2602
- justifyContent: col.textAlign ?? "center"
2602
+ justifyContent: col.textAlign ?? "left"
2603
2603
  },
2604
2604
  className: "r-headercell-div",
2605
2605
  children: t(col.headerText ?? "")
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-table-edit",
3
3
  "license": "MIT",
4
- "version": "0.1.8",
4
+ "version": "0.2.0",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",