Mat*_*ial 0 javascript native reactjs react-native
当我打开 DropDown 并且无法选择或滚动 DrowDown 对话框时,我收到错误VirtualizedLists 不应该嵌套在普通 ScrollViews 中,我大约知道问题是什么,有人可以告诉我原因或向我展示解决方案吗?
<ScrollView>
{formSchema.map((field, index) => {
const { name, label, type } = field;
if (type === 'select') {
return (
<View style={styles.sropsownWrapper} key={index}>
<Dropdown
/>
</View>
);
}
if (type === 'input') {
return (
<View style={styles.wrapper}>
<Input
name={name}
label={label}
/>
</View>
);
}
})}
<View
style={{
...styles.controls,
backgroundColor: '#242424',
}}>
<View style={styles.wrapper}>
<Button onPress={() => ()} />
</View>
<View style={styles.wrapper}>
<Button text="Go" />
</View>
</View>
</ScrollView>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2480 次 |
| 最近记录: |