arengibook 2.0.16-table → 2.0.17-table
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 +11 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -48079,7 +48079,6 @@ var Table = function Table(_ref1) {
|
|
|
48079
48079
|
return function (rowData) {
|
|
48080
48080
|
var text = rowData[col.field];
|
|
48081
48081
|
var color = rowData[col.field + 'Color'];
|
|
48082
|
-
console.log(rowData);
|
|
48083
48082
|
if (!color) return text !== null && text !== void 0 ? text : '';
|
|
48084
48083
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
48085
48084
|
className: "tab_label",
|
|
@@ -48092,7 +48091,6 @@ var Table = function Table(_ref1) {
|
|
|
48092
48091
|
}, []);
|
|
48093
48092
|
var pictoTemplate = useCallback(function (col) {
|
|
48094
48093
|
return function (rowData) {
|
|
48095
|
-
console.log(rowData);
|
|
48096
48094
|
var text = rowData[col.field];
|
|
48097
48095
|
var picto = rowData[col.field + 'Picto'];
|
|
48098
48096
|
if (!picto) return text !== null && text !== void 0 ? text : '';
|
|
@@ -48345,7 +48343,6 @@ var Table = function Table(_ref1) {
|
|
|
48345
48343
|
}
|
|
48346
48344
|
}, [editable, rowEdit, textEditor, dateEditor, selectEditor, selectMultipleEditor, numericEditor, documentEditor, deviseEditor, treeSelectEditor]);
|
|
48347
48345
|
var onCellEditComplete = useCallback(function (e) {
|
|
48348
|
-
if (rowEdit) return;
|
|
48349
48346
|
var rowData = e.rowData,
|
|
48350
48347
|
newRowData = e.newRowData,
|
|
48351
48348
|
field = e.field;
|
|
@@ -48364,7 +48361,7 @@ var Table = function Table(_ref1) {
|
|
|
48364
48361
|
field: field,
|
|
48365
48362
|
newValue: newRowData[field]
|
|
48366
48363
|
});
|
|
48367
|
-
}, [data, onChange, onCellChange, columns
|
|
48364
|
+
}, [data, onChange, onCellChange, columns]);
|
|
48368
48365
|
|
|
48369
48366
|
/** Get the body renderer for a column based on its type */
|
|
48370
48367
|
var getBodyTemplate = useCallback(function (col) {
|
|
@@ -48387,10 +48384,10 @@ var Table = function Table(_ref1) {
|
|
|
48387
48384
|
isRowEditing: !!editingRows[rowData.id],
|
|
48388
48385
|
onSave: function onSave(v) {
|
|
48389
48386
|
updateRow(rowData.id, col.field, v);
|
|
48390
|
-
|
|
48387
|
+
onCellEditComplete({
|
|
48391
48388
|
rowData: rowData,
|
|
48392
|
-
|
|
48393
|
-
|
|
48389
|
+
newRowData: _objectSpread2(_objectSpread2({}, rowData), {}, _defineProperty$f({}, col.field, v)),
|
|
48390
|
+
field: col.field
|
|
48394
48391
|
});
|
|
48395
48392
|
}
|
|
48396
48393
|
});
|
|
@@ -48439,7 +48436,12 @@ var Table = function Table(_ref1) {
|
|
|
48439
48436
|
editable: colEditable,
|
|
48440
48437
|
isRowEditing: !!editingRows[rowData.id],
|
|
48441
48438
|
onSave: function onSave(v) {
|
|
48442
|
-
|
|
48439
|
+
updateRow(rowData.id, col.field, v);
|
|
48440
|
+
onCellEditComplete({
|
|
48441
|
+
rowData: rowData,
|
|
48442
|
+
newRowData: _objectSpread2(_objectSpread2({}, rowData), {}, _defineProperty$f({}, col.field, v)),
|
|
48443
|
+
field: col.field
|
|
48444
|
+
});
|
|
48443
48445
|
},
|
|
48444
48446
|
renderDisplay: displayFn !== null && displayFn !== void 0 ? displayFn : function (rd) {
|
|
48445
48447
|
var _rd$col$field;
|
|
@@ -48449,7 +48451,7 @@ var Table = function Table(_ref1) {
|
|
|
48449
48451
|
};
|
|
48450
48452
|
}
|
|
48451
48453
|
return displayFn;
|
|
48452
|
-
}, [rowEdit, editable, editingRows, updateRow,
|
|
48454
|
+
}, [rowEdit, editable, editingRows, updateRow, onCellEditComplete, linkTemplate, dateTemplate, selectTemplate, selectMultipleTemplate, colorTextTemplate, pictoTemplate, textTemplate, numericTemplate, calculTemplate, documentTemplate, deviseTemplate, treeSelectTemplate]);
|
|
48453
48455
|
var getSortField = useCallback(function (col) {
|
|
48454
48456
|
return col.field;
|
|
48455
48457
|
}, []);
|