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