Skip to content

Commit 6c784f3

Browse files
authored
Merge pull request Expensify#88529 from callstack-internal/VickyStash/bugfix/88067-fix-blank-space
2 parents dc8e2eb + 2455990 commit 6c784f3

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

src/hooks/useReportScrollManager/index.native.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function useReportScrollManager(): ReportScrollManagerData {
2727
}
2828

2929
scrollPositionRef.current = {offset: 0};
30-
flatListRef.current?.scrollToOffset({animated: false, offset: 0});
30+
flatListRef.current.scrollToIndex({animated: false, index: 0});
3131
};
3232

3333
/**

src/hooks/useReportScrollManager/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function useReportScrollManager(): ReportScrollManagerData {
2525
return;
2626
}
2727

28-
flatListRef.current.scrollToOffset({animated: false, offset: 0});
28+
flatListRef.current.scrollToIndex({animated: false, index: 0});
2929
};
3030

3131
/**

src/pages/inbox/report/ReportActionsList.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -548,10 +548,7 @@ function ReportActionsList({
548548
}
549549
} else {
550550
setIsFloatingMessageCounterVisible(false);
551-
// Wait for the next frame so the list has laid out new items before scrolling
552-
requestAnimationFrame(() => {
553-
reportScrollManager.scrollToBottom();
554-
});
551+
reportScrollManager.scrollToBottom();
555552
}
556553

557554
setIsScrollToBottomEnabled(true);

0 commit comments

Comments
 (0)