Skip to content

Commit c1b2375

Browse files
fix: remove content offset from stickyHeaderConfig.offset spacer
viewToMeasureBoundedSize applied marginTop: stickyHeaderOffset which shifts all list content down by the offset amount, not just the sticky pin position (see #2419).
1 parent 435b514 commit c1b2375

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/recyclerview/RecyclerView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,14 +505,14 @@ const RecyclerViewComponent = <T,>(
505505
return (
506506
<CompatView
507507
style={{
508-
marginTop: horizontal ? undefined : stickyHeaderOffset,
508+
marginTop: undefined,
509509
height: horizontal ? undefined : 0,
510510
width: horizontal ? 0 : undefined,
511511
}}
512512
ref={firstChildViewRef}
513513
/>
514514
);
515-
}, [horizontal, stickyHeaderOffset]);
515+
}, [horizontal]);
516516

517517
const scrollAnchor = useMemo(() => {
518518
if (shouldMaintainVisibleContentPosition) {

0 commit comments

Comments
 (0)