react-table-edit 1.2.34 → 1.2.35
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 +2 -11
- package/dist/index.mjs +2 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3418,9 +3418,9 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
|
|
|
3418
3418
|
{
|
|
3419
3419
|
id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
|
|
3420
3420
|
style: { textAlign: col.textAlign, height: 29 },
|
|
3421
|
-
|
|
3421
|
+
value: isNullOrUndefined(row[col.field]) ? "" : row[col.field],
|
|
3422
3422
|
className: (0, import_classnames14.default)("border-0 rounded-0 input-element", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
|
|
3423
|
-
|
|
3423
|
+
onChange: (val) => {
|
|
3424
3424
|
if (row[col.field] != val.target?.value) {
|
|
3425
3425
|
row[col.field] = val.target?.value;
|
|
3426
3426
|
if (col.callback) {
|
|
@@ -3430,15 +3430,6 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
|
|
|
3430
3430
|
}
|
|
3431
3431
|
},
|
|
3432
3432
|
onKeyDown: (e) => {
|
|
3433
|
-
if (e.key === "ArrowDown" || e.key === "NumpadEnter" || e.key === "ArrowUp" || e.key === "Enter" || e.key === "Tab") {
|
|
3434
|
-
if (row[col.field] != e.target?.value) {
|
|
3435
|
-
row[col.field] = e.target?.value;
|
|
3436
|
-
handleDataChange(row, col, indexRow);
|
|
3437
|
-
if (col.callback) {
|
|
3438
|
-
col.callback(e.target.value, indexRow);
|
|
3439
|
-
}
|
|
3440
|
-
}
|
|
3441
|
-
}
|
|
3442
3433
|
checkKeyDown(e, row, col, indexRow + 1, indexCol + 1);
|
|
3443
3434
|
},
|
|
3444
3435
|
onPaste: (e) => {
|
package/dist/index.mjs
CHANGED
|
@@ -3388,9 +3388,9 @@ var TableEdit = forwardRef4((props, ref) => {
|
|
|
3388
3388
|
{
|
|
3389
3389
|
id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
|
|
3390
3390
|
style: { textAlign: col.textAlign, height: 29 },
|
|
3391
|
-
|
|
3391
|
+
value: isNullOrUndefined(row[col.field]) ? "" : row[col.field],
|
|
3392
3392
|
className: classnames9("border-0 rounded-0 input-element", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
|
|
3393
|
-
|
|
3393
|
+
onChange: (val) => {
|
|
3394
3394
|
if (row[col.field] != val.target?.value) {
|
|
3395
3395
|
row[col.field] = val.target?.value;
|
|
3396
3396
|
if (col.callback) {
|
|
@@ -3400,15 +3400,6 @@ var TableEdit = forwardRef4((props, ref) => {
|
|
|
3400
3400
|
}
|
|
3401
3401
|
},
|
|
3402
3402
|
onKeyDown: (e) => {
|
|
3403
|
-
if (e.key === "ArrowDown" || e.key === "NumpadEnter" || e.key === "ArrowUp" || e.key === "Enter" || e.key === "Tab") {
|
|
3404
|
-
if (row[col.field] != e.target?.value) {
|
|
3405
|
-
row[col.field] = e.target?.value;
|
|
3406
|
-
handleDataChange(row, col, indexRow);
|
|
3407
|
-
if (col.callback) {
|
|
3408
|
-
col.callback(e.target.value, indexRow);
|
|
3409
|
-
}
|
|
3410
|
-
}
|
|
3411
|
-
}
|
|
3412
3403
|
checkKeyDown(e, row, col, indexRow + 1, indexCol + 1);
|
|
3413
3404
|
},
|
|
3414
3405
|
onPaste: (e) => {
|