arengibook 2.0.16-table → 2.0.18-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 +12 -9
  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,7 @@ 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;
48346
+ console.log('là');
48349
48347
  var rowData = e.rowData,
48350
48348
  newRowData = e.newRowData,
48351
48349
  field = e.field;
@@ -48364,7 +48362,7 @@ var Table = function Table(_ref1) {
48364
48362
  field: field,
48365
48363
  newValue: newRowData[field]
48366
48364
  });
48367
- }, [data, onChange, onCellChange, columns, rowEdit]);
48365
+ }, [data, onChange, onCellChange, columns]);
48368
48366
 
48369
48367
  /** Get the body renderer for a column based on its type */
48370
48368
  var getBodyTemplate = useCallback(function (col) {
@@ -48387,10 +48385,10 @@ var Table = function Table(_ref1) {
48387
48385
  isRowEditing: !!editingRows[rowData.id],
48388
48386
  onSave: function onSave(v) {
48389
48387
  updateRow(rowData.id, col.field, v);
48390
- onCellChange === null || onCellChange === void 0 || onCellChange({
48388
+ onCellEditComplete({
48391
48389
  rowData: rowData,
48392
- field: col.field,
48393
- newValue: v
48390
+ newRowData: _objectSpread2(_objectSpread2({}, rowData), {}, _defineProperty$f({}, col.field, v)),
48391
+ field: col.field
48394
48392
  });
48395
48393
  }
48396
48394
  });
@@ -48439,7 +48437,12 @@ var Table = function Table(_ref1) {
48439
48437
  editable: colEditable,
48440
48438
  isRowEditing: !!editingRows[rowData.id],
48441
48439
  onSave: function onSave(v) {
48442
- return updateRow(rowData.id, col.field, v);
48440
+ updateRow(rowData.id, col.field, v);
48441
+ onCellEditComplete({
48442
+ rowData: rowData,
48443
+ newRowData: _objectSpread2(_objectSpread2({}, rowData), {}, _defineProperty$f({}, col.field, v)),
48444
+ field: col.field
48445
+ });
48443
48446
  },
48444
48447
  renderDisplay: displayFn !== null && displayFn !== void 0 ? displayFn : function (rd) {
48445
48448
  var _rd$col$field;
@@ -48449,7 +48452,7 @@ var Table = function Table(_ref1) {
48449
48452
  };
48450
48453
  }
48451
48454
  return displayFn;
48452
- }, [rowEdit, editable, editingRows, updateRow, onCellChange, linkTemplate, dateTemplate, selectTemplate, selectMultipleTemplate, colorTextTemplate, pictoTemplate, textTemplate, numericTemplate, calculTemplate, documentTemplate, deviseTemplate, treeSelectTemplate]);
48455
+ }, [rowEdit, editable, editingRows, updateRow, onCellEditComplete, linkTemplate, dateTemplate, selectTemplate, selectMultipleTemplate, colorTextTemplate, pictoTemplate, textTemplate, numericTemplate, calculTemplate, documentTemplate, deviseTemplate, treeSelectTemplate]);
48453
48456
  var getSortField = useCallback(function (col) {
48454
48457
  return col.field;
48455
48458
  }, []);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arengibook",
3
3
  "private": false,
4
- "version": "2.0.16-table",
4
+ "version": "2.0.18-table",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "exports": {