Skip to content

Commit

Permalink
Merge pull request #34244 from margelo/perunt/return-autoscrollToTopT…
Browse files Browse the repository at this point in the history
…hreshold

`AutoscrollToTopThreshold`
  • Loading branch information
roryabraham authored Jan 10, 2024
2 parents 2093cd0 + 1c80e20 commit 99e91c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/InvertedFlatList/BaseInvertedFlatList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type {FlatListProps} from 'react-native';
import FlatList from '@components/FlatList';

const WINDOW_SIZE = 15;
const AUTOSCROLL_TO_TOP_THRESHOLD = 128;

function BaseInvertedFlatList<T>(props: FlatListProps<T>, ref: ForwardedRef<FlatList>) {
return (
Expand All @@ -14,6 +15,7 @@ function BaseInvertedFlatList<T>(props: FlatListProps<T>, ref: ForwardedRef<Flat
windowSize={WINDOW_SIZE}
maintainVisibleContentPosition={{
minIndexForVisible: 0,
autoscrollToTopThreshold: AUTOSCROLL_TO_TOP_THRESHOLD,
}}
inverted
/>
Expand Down

0 comments on commit 99e91c3

Please sign in to comment.