sheet-happens 0.0.26 → 0.0.28

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.
@@ -2762,6 +2762,7 @@ var Sheet = forwardRef(function (props, ref) {
2762
2762
  setEditCell(editCell);
2763
2763
  setEditValue(val);
2764
2764
  setArrowKeyCommitMode(arrowKeyCommitMode);
2765
+ setLastEditKey(editKeys.apply(void 0, editCell));
2765
2766
  };
2766
2767
 
2767
2768
  var hitmapRef = useRef(NO_CLICKABLES);
@@ -2907,17 +2908,10 @@ var Sheet = forwardRef(function (props, ref) {
2907
2908
  e.preventDefault();
2908
2909
  };
2909
2910
 
2910
- var editKey = editKeys ? editKeys.apply(void 0, editCell) : '';
2911
-
2912
- var _useState10 = useState(editKey),
2911
+ var _useState10 = useState(''),
2913
2912
  lastEditKey = _useState10[0],
2914
2913
  setLastEditKey = _useState10[1];
2915
2914
 
2916
- if (lastEditKey !== NO_CELL.join(',') && lastEditKey !== editKey) {
2917
- setLastEditKey(editKey);
2918
- setEditCell(NO_CELL);
2919
- }
2920
-
2921
2915
  var editTextPosition = ORIGIN;
2922
2916
  var editTextWidth = 0;
2923
2917
  var editTextHeight = 0;
@@ -2930,6 +2924,12 @@ var Sheet = forwardRef(function (props, ref) {
2930
2924
  editTextWidth = cellWidth(editCellX) - 3;
2931
2925
  editTextHeight = cellHeight(editCellY) - 3;
2932
2926
  editTextTextAlign = style.textAlign || DEFAULT_CELL_STYLE.textAlign || 'left';
2927
+ var editKey = editKeys.apply(void 0, editCell);
2928
+
2929
+ if (editKey !== lastEditKey) {
2930
+ setLastEditKey('');
2931
+ setEditCell(NO_CELL);
2932
+ }
2933
2933
  }
2934
2934
 
2935
2935
  var _editTextPosition = editTextPosition,