Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道我可以制作一个暂时不可滚动的平面列表。例如:有一个布尔常量,无论何时为真,您都可以滚动平面列表,但无论何时为假,我怎样才能使它不能滚动?
FlatList 根据docs继承了 ScrollView 的 props ,所以它应该有scrollEnabledprop ScrollView的props 并尝试将其设置为:
scrollEnabled
scrollEnabled={ false }
在您的 FlatList 道具中。