Skip to content

Commit 0928292

Browse files
Merge pull request #43810 from Krishna2323/krishna2323/issue/42577
fix: Distance - Page is not scrollable after adding multiple stops.
2 parents d2fdb27 + c04d00b commit 0928292

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/components/DraggableList/index.android.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
import React from 'react';
22
import {View} from 'react-native';
3-
import DraggableFlatList from 'react-native-draggable-flatlist';
4-
import type {FlatList} from 'react-native-gesture-handler';
3+
import {NestableDraggableFlatList, NestableScrollContainer} from 'react-native-draggable-flatlist';
4+
import type {ScrollView} from 'react-native-gesture-handler';
55
import useThemeStyles from '@hooks/useThemeStyles';
66
import type {DraggableListProps} from './types';
77

8-
function DraggableList<T>({renderClone, shouldUsePortal, ListFooterComponent, ...viewProps}: DraggableListProps<T>, ref: React.ForwardedRef<FlatList<T>>) {
8+
function DraggableList<T>({renderClone, shouldUsePortal, ListFooterComponent, ...viewProps}: DraggableListProps<T>, ref: React.ForwardedRef<ScrollView>) {
99
const styles = useThemeStyles();
1010
return (
11-
<View style={styles.flex1}>
12-
<DraggableFlatList
13-
ref={ref}
14-
containerStyle={ListFooterComponent ? undefined : styles.flex1}
15-
contentContainerStyle={ListFooterComponent ? undefined : styles.flexGrow1}
11+
<NestableScrollContainer
12+
ref={ref}
13+
contentContainerStyle={styles.flexGrow1}
14+
>
15+
<NestableDraggableFlatList
16+
contentContainerStyle={styles.flex1}
1617
// eslint-disable-next-line react/jsx-props-no-spreading
1718
{...viewProps}
1819
/>
1920
{React.isValidElement(ListFooterComponent) && <View style={styles.flexGrow1}>{ListFooterComponent}</View>}
20-
</View>
21+
</NestableScrollContainer>
2122
);
2223
}
2324

0 commit comments

Comments
 (0)