File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- import React , {
4
- PropTypes
5
- } from 'react' ;
3
+ import React from 'react' ;
4
+ import PropTypes from 'prop-types' ;
6
5
7
6
import {
8
7
View ,
@@ -33,7 +32,8 @@ const propTypes = {
33
32
cancelStyle : View . propTypes . style ,
34
33
cancelTextStyle : Text . propTypes . style ,
35
34
overlayStyle : View . propTypes . style ,
36
- cancelText : PropTypes . string
35
+ cancelText : PropTypes . string ,
36
+ keyboardShouldPersistTaps : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . bool ] )
37
37
} ;
38
38
39
39
const defaultProps = {
@@ -49,7 +49,8 @@ const defaultProps = {
49
49
cancelStyle : { } ,
50
50
cancelTextStyle : { } ,
51
51
overlayStyle : { } ,
52
- cancelText : 'cancel'
52
+ cancelText : 'cancel' ,
53
+ keyboardShouldPersistTaps : 'always'
53
54
} ;
54
55
55
56
export default class ModalPicker extends BaseComponent {
@@ -131,7 +132,7 @@ export default class ModalPicker extends BaseComponent {
131
132
return (
132
133
< View style = { [ styles . overlayStyle , this . props . overlayStyle ] } key = { 'modalPicker' + ( componentIndex ++ ) } >
133
134
< View style = { styles . optionContainer } >
134
- < ScrollView keyboardShouldPersistTaps >
135
+ < ScrollView keyboardShouldPersistTaps = { this . props . keyboardShouldPersistTaps } >
135
136
< View style = { { paddingHorizontal :10 } } >
136
137
{ options }
137
138
</ View >
Original file line number Diff line number Diff line change 22
22
" android" ,
23
23
" react-component"
24
24
],
25
+ "dependencies" : {
26
+ "prop-types" : " ^15.5.10"
27
+ },
25
28
"author" :
" Daniel Korger <[email protected] >" ,
26
29
"contributors" : [
27
30
{
You can’t perform that action at this time.
0 commit comments