[英]Stop FlatList from overflowing containing View?
Edit: Snack repro: https://snack.expo.dev/hwTTY2tQm编辑:Snack repro:https://snack.expo.dev/hwTTY2tQm
How do you make a FlatList stop expanding beyond its enclosing view and become scrollable while still taking all (legal) space in the enclosing view?您如何使 FlatList 停止扩展到其封闭视图之外并变得可滚动,同时仍占用封闭视图中的所有(合法)空间?
So far setting height to a specific number worked, but setting height to "100%" still overflows, setting flex:1 still overflows.到目前为止,将高度设置为特定数字有效,但将高度设置为“100%”仍然会溢出,设置 flex:1 仍然会溢出。
This is React Native Web.这是 React Native Web。
For flexbox to work correctly flex:1 must be maintained for every enclosing view up the hierarchy.为了使 flexbox 正常工作,必须为层次结构中的每个封闭视图维护 flex:1。 One of my views didn't have flex:1.
我的观点之一没有 flex:1。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.