簡體   English   中英

禁用用作 IOS 選擇器的 actionSheet

[英]Disable actionSheet which is used as a picker for IOS

我正在使用 react-native-actionsheet。 如何禁用用作選擇器的 ActionSheet(使其不可點擊)?

我試過: editable={false} 有更好的方法嗎?

                <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>

通過在列視圖中添加 pointerEvents="none" 解決了這個問題

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM