Skip to content

Commit cc33466

Browse files
committed
disable overscan top to avoid conflit with sticky header
1 parent 4a9f315 commit cc33466

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/libs/react-tree-view/useRednerIndexesWithSticky.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ export const useRednerIndexesWithSticky = ({
2626
}) => {
2727

2828
let startIndexRaw = start / lineHeight;
29-
let startIndex = Math.floor(Math.max(0, start - overscan) / lineHeight);
30-
let endIndex = Math.min(childCount, Math.ceil( Math.min(lineHeight * childCount, end + overscan) / lineHeight));
29+
let startIndex = Math.floor(start / lineHeight);
30+
// let startIndex = Math.floor(Math.max(0, start - overscan) / lineHeight);
31+
let endIndex = Math.min(childCount, Math.ceil(Math.min(lineHeight * childCount, end + overscan) / lineHeight));
3132
let renderSize = Math.min(Math.max(0, endIndex - startIndex), 500);
3233

3334
const computeStickyInfo = useCallback(

0 commit comments

Comments
 (0)