beefe / react-native-actionsheet

An elegant ActionSheet component for React Native.
MIT License
1.35k stars 343 forks source link

Disable actionSheet which is used as a picker for IOS #101

Closed aasalshehhi closed 4 years ago

aasalshehhi commented 4 years ago

How can I disable an ActionSheet which is used as a Picker (make it not clickable)?

I tried editable={false}, any other ideas please?

                <View style={styles.Column}>
                  <Text style={styles.TextLabel} onPress={this.showActionSheet}>Structure Type:</Text>
                    <ActionSheet
                  ref={o => this.ActionSheet = o}
                  title={'Structure Type'}
                  options={['first', 'second', 'third', 'Cancel']}
                  cancelButtonIndex={3}
                  selectedValue={this.state.structureType}
                  value={this.state.structureType}
                  onPress={this.handleSTypePress}
                  editable={false}
                />
                </View>
aasalshehhi commented 4 years ago

Solved it by adding pointerEvents="none" to the column view