sheet-happens 0.0.57 → 0.0.58

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 CHANGED
@@ -3719,16 +3719,17 @@ var Sheet = React.forwardRef(function (props, ref) {
3719
3719
  if (cellReadOnly(cellX, cellY)) {
3720
3720
  return;
3721
3721
  }
3722
- var hasData = !!((_props$inputComponent = props.inputComponent) !== null && _props$inputComponent !== void 0 && _props$inputComponent.call(props, cellX, cellY, _extends({}, inputProps, {
3722
+ var hasCustomComponent = !!((_props$inputComponent = props.inputComponent) !== null && _props$inputComponent !== void 0 && _props$inputComponent.call(props, cellX, cellY, _extends({}, inputProps, {
3723
3723
  onChange: function onChange() {}
3724
3724
  }), function () {}));
3725
3725
  var editValue = (_editData = editData(cellX, cellY)) != null ? _editData : '';
3726
3726
  var sourceValue = (_sourceData = sourceData(cellX, cellY)) != null ? _sourceData : null;
3727
- if (hasData) {
3727
+ if (hasCustomComponent) {
3728
3728
  setEditValue(null);
3729
3729
  setSourceValue(sourceValue);
3730
3730
  } else {
3731
3731
  setEditValue(editValue);
3732
+ setSourceValue(null);
3732
3733
  }
3733
3734
  setEditCell(editCell);
3734
3735
  setArrowKeyCommitMode(arrowKeyCommitMode);