@symply.io/basic-components 1.7.0-beta.4 → 1.7.0
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.
@@ -349,6 +349,6 @@ var VirtualDataTable = function (props, ref) {
|
|
349
349
|
TableBody: forwardRef(function (props, ref) { return (_jsx(TableBody, __assign({}, props, { ref: ref }))); }),
|
350
350
|
TableFoot: forwardRef(function (props, ref) { return (_jsx(TableFooter, __assign({}, props, { ref: ref }))); }),
|
351
351
|
}); }, [onRowClick, onContextMenu, handleCustomizeRowBgColor]);
|
352
|
-
return (_jsx(TableVirtuoso, { data: rows, increaseViewportBy: { top:
|
352
|
+
return (_jsx(TableVirtuoso, { data: rows, increaseViewportBy: { top: 320, bottom: 480 }, initialTopMostItemIndex: 0, style: { height: height }, onScroll: onScroll, onResize: onScroll, components: VirtuosoTableComponents, fixedHeaderContent: fixedHeaderContent, fixedFooterContent: fixedFooterContent, itemContent: itemContent, scrollerRef: reflectScrollerRef }));
|
353
353
|
};
|
354
354
|
export default forwardRef(VirtualDataTable);
|
@@ -97,6 +97,9 @@ function useInteractions(props) {
|
|
97
97
|
}, [columns, onScroll]);
|
98
98
|
useEffect(function () {
|
99
99
|
window.addEventListener("resize", onScroll);
|
100
|
+
return function () {
|
101
|
+
window.removeEventListener("resize", onScroll);
|
102
|
+
};
|
100
103
|
}, [onScroll]);
|
101
104
|
return {
|
102
105
|
normalCols: normalCols,
|