sohobloo / react-native-modal-dropdown

A react-native dropdown/picker/selector component for both Android & iOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

options最多10个,超过10个后,一选择就出错。

iamaluckyman opened this issue · comments

commented

把您的例子中修改如下,其他不动,可以再现。
const DEMO_OPTIONS_1 = ['option 1', 'option 2', 'option 3', 'option 4', 'option 5', 'option 6', 'option 7', 'option 8', 'option 9','option10','aaaaaa'];

错误信息如下
View was rendered with explicitly set width/height but with a 0 flexBasis. (This might be fixed by changing flx: to FlexGrow:)
View:<RCTShadowWiew: 0x6080001bbc80; viewName:RCTView; reactTag:72;frame:{{0,0},{146,40}}>

react-native:0.39.2
虚拟机上跑的
错误信息截图

I create a clear copy same as your env but still can't reproduce it.
Sorry but I'll try more later.

commented

谢谢您的回答。
现象是: 画面初期化可以正常出来,之后点击选择下拉,立马就红色错误。
难道是我的环境有问题,抽空我换台电脑再做个虚拟机看看

commented

前面是IOS的,今天又在安卓上仅代码<ModalDropdown options={['option 1', 'option 2', 'option 3', 'option 4', 'option5', 'option6', 'option7', 'option8', 'option9', 'option10','11','12','13','14','15','16']}/>

<ModalDropdown options={['option 1', 'option 2', 'option 3', 'option 4', 'option5', 'option6', 'option7', 'option8', 'option9', 'option10','11']}/>

来测试。

下拉出来的内容居然只有一部分,滚动也上不去。
image

commented

非常感谢您的修改。已经确认过了,IOS/ANDROID都OK了。