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.
- package/dist/index.js +15 -9
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +15 -9
- package/dist/index.modern.js.map +1 -1
- package/dist/sheet.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -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()
|
|
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
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
props.onSelectionChanged(
|
|
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() {
|