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`

(cherry picked from commit 99e91c3)
  • Loading branch information
roryabraham authored and OSBotify committed Jan 10, 2024
1 parent f885ce9 commit 6b93aef
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 6b93aef

Please sign in to comment.