Skip to content

Commit 0990d0f

Browse files
authored
Merge pull request hossein-zare#609 from getmental/dev-5.x
support a `modalAnimationType` prop
2 parents 3316830 + 2ac1f48 commit 0990d0f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ declare module 'react-native-dropdown-picker' {
176176
searchPlaceholderTextColor?: string;
177177
dropDownContainerStyle?: StyleProp<ViewStyle>;
178178
modalContentContainerStyle?: StyleProp<ViewStyle>;
179+
modalAnimationType?: 'none' | 'slide' | 'fade';
179180
arrowIconContainerStyle?: StyleProp<ViewStyle>;
180181
closeIconContainerStyle?: StyleProp<ViewStyle>;
181182
tickIconContainerStyle?: StyleProp<ViewStyle>;

src/components/Picker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ function Picker({
7575
searchPlaceholderTextColor = Colors.GREY,
7676
dropDownContainerStyle = {},
7777
modalContentContainerStyle = {},
78+
modalAnimationType = 'none',
7879
arrowIconContainerStyle = {},
7980
closeIconContainerStyle = {},
8081
tickIconContainerStyle = {},
@@ -1749,7 +1750,7 @@ function Picker({
17491750
* @returns {JSX.Element}
17501751
*/
17511752
const DropDownModalComponent = useMemo(() => (
1752-
<Modal visible={open} presentationStyle="fullScreen" onRequestClose={onRequestCloseModal} {...modalProps}>
1753+
<Modal animationType={modalAnimationType} visible={open} presentationStyle="fullScreen" onRequestClose={onRequestCloseModal} {...modalProps}>
17531754
<SafeAreaView style={_modalContentContainerStyle}>
17541755
{SearchComponent}
17551756
{DropDownFlatListComponent}

0 commit comments

Comments
 (0)