arengibook 2.0.15-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.
Files changed (2) hide show
  1. package/dist/index.js +14 -7
  2. 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, rowEdit]);
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) {
@@ -48386,7 +48383,12 @@ var Table = function Table(_ref1) {
48386
48383
  editable: colEditable,
48387
48384
  isRowEditing: !!editingRows[rowData.id],
48388
48385
  onSave: function onSave(v) {
48389
- return updateRow(rowData.id, col.field, v);
48386
+ updateRow(rowData.id, col.field, v);
48387
+ onCellEditComplete({
48388
+ rowData: rowData,
48389
+ newRowData: _objectSpread2(_objectSpread2({}, rowData), {}, _defineProperty$f({}, col.field, v)),
48390
+ field: col.field
48391
+ });
48390
48392
  }
48391
48393
  });
48392
48394
  };
@@ -48434,7 +48436,12 @@ var Table = function Table(_ref1) {
48434
48436
  editable: colEditable,
48435
48437
  isRowEditing: !!editingRows[rowData.id],
48436
48438
  onSave: function onSave(v) {
48437
- return updateRow(rowData.id, col.field, v);
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
+ });
48438
48445
  },
48439
48446
  renderDisplay: displayFn !== null && displayFn !== void 0 ? displayFn : function (rd) {
48440
48447
  var _rd$col$field;
@@ -48444,7 +48451,7 @@ var Table = function Table(_ref1) {
48444
48451
  };
48445
48452
  }
48446
48453
  return displayFn;
48447
- }, [rowEdit, editable, editingRows, updateRow, linkTemplate, dateTemplate, selectTemplate, selectMultipleTemplate, colorTextTemplate, pictoTemplate, textTemplate, numericTemplate, calculTemplate, documentTemplate, deviseTemplate, treeSelectTemplate]);
48454
+ }, [rowEdit, editable, editingRows, updateRow, onCellEditComplete, linkTemplate, dateTemplate, selectTemplate, selectMultipleTemplate, colorTextTemplate, pictoTemplate, textTemplate, numericTemplate, calculTemplate, documentTemplate, deviseTemplate, treeSelectTemplate]);
48448
48455
  var getSortField = useCallback(function (col) {
48449
48456
  return col.field;
48450
48457
  }, []);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arengibook",
3
3
  "private": false,
4
- "version": "2.0.15-table",
4
+ "version": "2.0.17-table",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "exports": {