如何消除VirtualizedLists不应被嵌套在普通ScrollViews中的警告?

1 人关注

在React Native 0.63.2应用中,一个自动完成的标签模块被用来输入标签。

import { Container, Content, Form } from 'native-base';
import AutoTags from 'react-native-tag-autocomplete';
return (
   <Container style={styles.container}>
    <Content>
       <AutoTags {...} />
      </View>
    </Content>
   </Container>

安卓系统上的这种自动完成会导致下面的警告。

[Tue Sep 22 2020 22:14:44.869]  WARN     VirtualizedLists should never be nested inside plain ScrollViews with the same orientation - use another VirtualizedList-backed container instead.
VirtualizedList@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:60874:22
FlatList@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:60384:36
RCTView
RCTView
Autocomplete@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:178291:36
RCTView
AutoTags@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:178008:36
RCTView
RCTView
RCTScrollView
ScrollView@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:62918:36
ScrollView
KeyboardAwareScrollView@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:165819:38
RCTView
SafeAreaView@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:72424:41
Content@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:165626:22
Styled(Content)@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:121268:40
RCTView
Container@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:164435:22
Styled(Container)@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:121268:40
Itie@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:172340:26
StaticContainer@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:104533:17