sheet-happens 0.0.44 → 0.0.45

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.
@@ -1217,7 +1217,7 @@ var useMouse = function useMouse(hitmapRef, selection, knobArea, editMode, editD
1217
1217
  var newWidth = Math.max(size + x - anchor + scroll - currentScroll, SIZES.minimumWidth * indices.length);
1218
1218
  onInvalidateColumn === null || onInvalidateColumn === void 0 ? void 0 : onInvalidateColumn(indices[0] - 1);
1219
1219
  onCellWidthChange(indices, indices.map(function (_) {
1220
- return newWidth / indices.length;
1220
+ return Math.round(newWidth / indices.length);
1221
1221
  }));
1222
1222
  }
1223
1223
 
@@ -1341,15 +1341,18 @@ var useMouse = function useMouse(hitmapRef, selection, knobArea, editMode, editD
1341
1341
  selection = _ref$current4.selection,
1342
1342
  _ref$current4$cellLay = _ref$current4.cellLayout,
1343
1343
  pixelToCell = _ref$current4$cellLay.pixelToCell,
1344
- columnToPixel = _ref$current4$cellLay.columnToPixel;
1344
+ columnToPixel = _ref$current4$cellLay.columnToPixel,
1345
+ getIndentY = _ref$current4$cellLay.getIndentY;
1345
1346
  e.preventDefault();
1346
1347
  if (e.shiftKey) return;
1347
1348
  var xy = getMousePosition(e);
1348
1349
  if (!xy) return;
1349
- var x = xy[0];
1350
+ var x = xy[0],
1351
+ y = xy[1];
1352
+ var indentY = getIndentY();
1350
1353
  var columns = visibleCells.columns;
1351
1354
 
1352
- if (onCellWidthChange) {
1355
+ if (onCellWidthChange && y < indentY) {
1353
1356
  var autosized = [];
1354
1357
 
1355
1358
  for (var _iterator10 = _createForOfIteratorHelperLoose(columns), _step10; !(_step10 = _iterator10()).done;) {
@@ -3722,7 +3725,7 @@ var Sheet = forwardRef(function (props, ref) {
3722
3725
  var hitmapRef = useRef(NO_CLICKABLES);
3723
3726
  var isFocused = focused || editMode;
3724
3727
 
3725
- var _useClipboardAPI = useClipboardAPI(selection, editData, cellReadOnly, isFocused, changeSelection, props.onChange, props.onCopy, props.onPaste),
3728
+ var _useClipboardAPI = useClipboardAPI(selection, editData, cellReadOnly, isFocused && !editMode, changeSelection, props.onChange, props.onCopy, props.onPaste),
3726
3729
  clipboardApi = _useClipboardAPI.clipboardApi,
3727
3730
  onClipboardCopy = _useClipboardAPI.onClipboardCopy;
3728
3731