Meituan-Dianping / beeshell

React Native 组件库
MIT License
1.8k stars 280 forks source link

Cascader组件加载时报错Each child in an array or iterator should have a unique key #25

Closed onebean06 closed 5 years ago

onebean06 commented 5 years ago

问题是什么

问题的具体描述,尽量详细

环境

在线例子

如果有请提供在线例子或代码片段

其他

其他信息

onebean06 commented 5 years ago

问题是什么

将Cascader放入 SlideModal 下拉显示时,第一次加载正常,再次下拉就会报出上述错误

环境 系统:Android beeshell版本:1.0.1

在线例子

       <SlideModal ref={(c) => { this.modalCascader = c; }} cancelable={true}  offsetY={140}  
                             direction={'down'} >
                        <View>
                            <Cascader options={this.state.options}  style={{ height: 300 }} 
                                      structKeys={['name', 'val', 'child']}
                                      itemSelectedStyle={{ color: 'blue', backgroundColor: 'lightyellow' }}
                                onConfirm={(selectedChain) => this.onCascaderConfirm(selectedChain)}
                            />
                        </View>
           </SlideModal>

其中Cascader的参数与示例中的一致

wxlworkhard commented 5 years ago

这个是警告吧,下个版本(3月底)会修复