es-grid-template 1.2.9 → 1.3.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.
|
@@ -331,10 +331,12 @@ const InternalTable = props => {
|
|
|
331
331
|
const handlePasteCallback = callbackData => {
|
|
332
332
|
const newDataUpdate = updateData(dataSource, callbackData, rowKey);
|
|
333
333
|
triggerChangeData(newDataUpdate);
|
|
334
|
-
|
|
334
|
+
|
|
335
|
+
// onCellPaste?.dataChange?.(newDataUpdate)
|
|
335
336
|
};
|
|
336
337
|
if (onCellPaste && onCellPaste.onPasted) {
|
|
337
338
|
if (onCellPaste.onPasted.length > 1) {
|
|
339
|
+
// có callback
|
|
338
340
|
onCellPaste.onPasted({
|
|
339
341
|
pasteData: pastedRows,
|
|
340
342
|
type: 'onPaste',
|
|
@@ -342,6 +344,7 @@ const InternalTable = props => {
|
|
|
342
344
|
pastedColumns: pastedColumnsArray
|
|
343
345
|
}, handlePasteCallback);
|
|
344
346
|
} else {
|
|
347
|
+
// không có callback
|
|
345
348
|
onCellPaste.onPasted({
|
|
346
349
|
pasteData: pastedRows,
|
|
347
350
|
type: 'onPaste',
|
|
@@ -349,8 +352,11 @@ const InternalTable = props => {
|
|
|
349
352
|
pastedColumns: pastedColumnsArray
|
|
350
353
|
}, handlePasteCallback);
|
|
351
354
|
triggerChangeData(newData);
|
|
352
|
-
|
|
355
|
+
|
|
356
|
+
// onCellPaste.dataChange?.(newData)
|
|
353
357
|
}
|
|
358
|
+
} else {
|
|
359
|
+
triggerChangeData(newData);
|
|
354
360
|
}
|
|
355
361
|
};
|
|
356
362
|
const TableComponent = groupAble ? Group : editAble ? GridEdit : Grid;
|
|
@@ -1499,8 +1499,8 @@ const GridEdit = props => {
|
|
|
1499
1499
|
heightTable: height,
|
|
1500
1500
|
style: {
|
|
1501
1501
|
position: 'relative'
|
|
1502
|
-
}
|
|
1503
|
-
onMouseUp
|
|
1502
|
+
}
|
|
1503
|
+
// onMouseUp={handleMouseUp}
|
|
1504
1504
|
}, /*#__PURE__*/React.createElement(TableContext.Provider, {
|
|
1505
1505
|
value: {
|
|
1506
1506
|
rowKey,
|
|
@@ -334,10 +334,12 @@ const InternalTable = props => {
|
|
|
334
334
|
const handlePasteCallback = callbackData => {
|
|
335
335
|
const newDataUpdate = (0, _hooks.updateData)(dataSource, callbackData, rowKey);
|
|
336
336
|
triggerChangeData(newDataUpdate);
|
|
337
|
-
|
|
337
|
+
|
|
338
|
+
// onCellPaste?.dataChange?.(newDataUpdate)
|
|
338
339
|
};
|
|
339
340
|
if (onCellPaste && onCellPaste.onPasted) {
|
|
340
341
|
if (onCellPaste.onPasted.length > 1) {
|
|
342
|
+
// có callback
|
|
341
343
|
onCellPaste.onPasted({
|
|
342
344
|
pasteData: pastedRows,
|
|
343
345
|
type: 'onPaste',
|
|
@@ -345,6 +347,7 @@ const InternalTable = props => {
|
|
|
345
347
|
pastedColumns: pastedColumnsArray
|
|
346
348
|
}, handlePasteCallback);
|
|
347
349
|
} else {
|
|
350
|
+
// không có callback
|
|
348
351
|
onCellPaste.onPasted({
|
|
349
352
|
pasteData: pastedRows,
|
|
350
353
|
type: 'onPaste',
|
|
@@ -352,8 +355,11 @@ const InternalTable = props => {
|
|
|
352
355
|
pastedColumns: pastedColumnsArray
|
|
353
356
|
}, handlePasteCallback);
|
|
354
357
|
triggerChangeData(newData);
|
|
355
|
-
|
|
358
|
+
|
|
359
|
+
// onCellPaste.dataChange?.(newData)
|
|
356
360
|
}
|
|
361
|
+
} else {
|
|
362
|
+
triggerChangeData(newData);
|
|
357
363
|
}
|
|
358
364
|
};
|
|
359
365
|
const TableComponent = groupAble ? _Group.default : editAble ? _GridEdit.default : _Grid.default;
|
|
@@ -1507,8 +1507,8 @@ const GridEdit = props => {
|
|
|
1507
1507
|
heightTable: height,
|
|
1508
1508
|
style: {
|
|
1509
1509
|
position: 'relative'
|
|
1510
|
-
}
|
|
1511
|
-
onMouseUp
|
|
1510
|
+
}
|
|
1511
|
+
// onMouseUp={handleMouseUp}
|
|
1512
1512
|
}, /*#__PURE__*/_react.default.createElement(_useContext.TableContext.Provider, {
|
|
1513
1513
|
value: {
|
|
1514
1514
|
rowKey,
|