@@ -33,6 +33,7 @@ export default class ModalDropdown extends Component {
3333 defaultValue : PropTypes . string ,
3434 options : PropTypes . array ,
3535
36+ accessible : PropTypes . bool ,
3637 animated : PropTypes . bool ,
3738 showsVerticalScrollIndicator : PropTypes . bool ,
3839
@@ -68,6 +69,7 @@ export default class ModalDropdown extends Component {
6869
6970 this . state = {
7071 disabled : props . disabled ,
72+ accessible : props . accessible !== false ,
7173 loading : props . options == null ,
7274 showDropdown : false ,
7375 buttonText : props . defaultValue ,
@@ -150,6 +152,7 @@ export default class ModalDropdown extends Component {
150152 return (
151153 < TouchableOpacity ref = { button => this . _button = button }
152154 disabled = { this . props . disabled }
155+ accessible = { this . props . accessible }
153156 onPress = { this . _onButtonPress . bind ( this ) } >
154157 {
155158 this . props . children ||
@@ -182,7 +185,8 @@ export default class ModalDropdown extends Component {
182185 transparent = { true }
183186 onRequestClose = { this . _onRequestClose . bind ( this ) }
184187 supportedOrientations = { [ 'portrait' , 'portrait-upside-down' , 'landscape' , 'landscape-left' , 'landscape-right' ] } >
185- < TouchableWithoutFeedback onPress = { this . _onModalPress . bind ( this ) } >
188+ < TouchableWithoutFeedback accessible = { this . props . accessible }
189+ onPress = { this . _onModalPress . bind ( this ) } >
186190 < View style = { styles . modal } >
187191 < View style = { [ styles . dropdown , this . props . dropdownStyle , frameStyle ] } >
188192 { this . state . loading ? this . _renderLoading ( ) : this . _renderDropdown ( ) }
@@ -279,7 +283,8 @@ export default class ModalDropdown extends Component {
279283 this . props . renderRow ( rowData , rowID , highlighted ) ;
280284 let preservedProps = {
281285 key : key ,
282- onPress : ( ) => this . _onRowPress ( rowData , sectionID , rowID , highlightRow )
286+ accessible : this . props . accessible ,
287+ onPress : ( ) => this . _onRowPress ( rowData , sectionID , rowID , highlightRow ) ,
283288 } ;
284289 if ( TOUCHABLE_ELEMENTS . find ( name => name == row . type . displayName ) ) {
285290 var props = { ...row . props } ;
0 commit comments