sheet-happens 0.0.22 → 0.0.23
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.d.ts +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +5 -4
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1032,6 +1032,11 @@ function Sheet(props) {
|
|
|
1032
1032
|
var rowSizes = useMemo(function () {
|
|
1033
1033
|
return calculateRowsOrColsSizes(sheetStyle.freezeRows, cellHeight, sheetStyle.columnHeaderHeight, dataOffset.y, canvasHeight);
|
|
1034
1034
|
}, [sheetStyle, cellHeight, dataOffset.y, canvasHeight]);
|
|
1035
|
+
useEffect(function () {
|
|
1036
|
+
if (props.onScrollChange) {
|
|
1037
|
+
props.onScrollChange([].concat(rowSizes.index), [].concat(columnSizes.index));
|
|
1038
|
+
}
|
|
1039
|
+
}, [rowSizes, columnSizes, props.onScrollChange]);
|
|
1035
1040
|
|
|
1036
1041
|
var changeSelection = function changeSelection(x1, y1, x2, y2, scrollToP2) {
|
|
1037
1042
|
if (scrollToP2 === void 0) {
|
|
@@ -1698,10 +1703,6 @@ function Sheet(props) {
|
|
|
1698
1703
|
x: cellX,
|
|
1699
1704
|
y: cellY
|
|
1700
1705
|
});
|
|
1701
|
-
|
|
1702
|
-
if (props.onScrollChange) {
|
|
1703
|
-
props.onScrollChange(cellX, cellY);
|
|
1704
|
-
}
|
|
1705
1706
|
}
|
|
1706
1707
|
|
|
1707
1708
|
var newMaxScroll = _extends({}, maxScroll);
|