File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -37,13 +37,15 @@ export function PickerAvoidingView(props) {
3737 }
3838 } , [ isPickerOpen ] ) ;
3939
40- return (
41- < View
42- style = { StyleSheet . compose ( props . style , {
43- paddingBottom : shouldAddSpace ? IOS_MODAL_HEIGHT : 0 ,
44- } ) }
45- >
46- { props . children }
47- </ View >
48- ) ;
40+ const style = props . enabled
41+ ? StyleSheet . compose ( props . style , {
42+ paddingBottom : shouldAddSpace ? IOS_MODAL_HEIGHT : 0 ,
43+ } )
44+ : props . style ;
45+
46+ return < View style = { style } > { props . children } </ View > ;
4947}
48+
49+ PickerAvoidingView . defaultProps = {
50+ enabled : true ,
51+ } ;
Original file line number Diff line number Diff line change @@ -9,5 +9,7 @@ import { View } from 'react-native';
99 * within the PickerAvoidingView.
1010 */
1111export function PickerAvoidingView ( props ) {
12- return < View { ...props } > { props . children } </ View > ;
12+ // eslint-disable-next-line no-unused-vars
13+ const { enabled, ...viewProps } = props ;
14+ return < View { ...viewProps } > { props . children } </ View > ;
1315}
You can’t perform that action at this time.
0 commit comments