sheet-happens 0.0.59 → 0.0.60

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.
@@ -1376,10 +1376,16 @@ var useMouse = function useMouse(elementRef, dataOffset, hitmapRef, selection, k
1376
1376
  if (!xy) return;
1377
1377
  var x = xy[0],
1378
1378
  y = xy[1];
1379
- if (x <= getIndentX() || y <= getIndentY()) {
1379
+ if (x <= getIndentX() && y <= getIndentY()) {
1380
1380
  return;
1381
1381
  }
1382
1382
  var cell = pixelToCell(xy);
1383
+ if (!hideRowHeaders && x < getIndentX()) {
1384
+ cell[0] = -1;
1385
+ }
1386
+ if (!hideColumnHeaders && y < getIndentY()) {
1387
+ cell[1] = -1;
1388
+ }
1383
1389
  if (!isPointInsideSelection(selection, cell)) {
1384
1390
  onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange([cell, cell]);
1385
1391
  }
@@ -3684,14 +3690,14 @@ var Sheet = forwardRef(function (props, ref) {
3684
3690
  scrollToSelection(newSelection, toHead);
3685
3691
  }
3686
3692
  if (props.onSelectionChanged) {
3687
- var _normalizeSelection = normalizeSelection(validateSelection(newSelection)),
3688
- _normalizeSelection$ = _normalizeSelection[0],
3689
- minX = _normalizeSelection$[0],
3690
- minY = _normalizeSelection$[1],
3691
- _normalizeSelection$2 = _normalizeSelection[1],
3692
- maxX = _normalizeSelection$2[0],
3693
- maxY = _normalizeSelection$2[1];
3694
- props.onSelectionChanged(minX, minY, maxX, maxY);
3693
+ var _validateSelection = validateSelection(newSelection),
3694
+ _validateSelection$ = _validateSelection[0],
3695
+ anchorX = _validateSelection$[0],
3696
+ anchorY = _validateSelection$[1],
3697
+ _validateSelection$2 = _validateSelection[1],
3698
+ headX = _validateSelection$2[0],
3699
+ headY = _validateSelection$2[1];
3700
+ props.onSelectionChanged(anchorX, anchorY, headX, headY);
3695
3701
  }
3696
3702
  };
3697
3703
  var cancelEditingCell = function cancelEditingCell() {