我有宽度属性的<Column />。如何使最后一列宽度等于所有可用宽度(我指的是块中的所有其他可用空间)?尝试设置minWidth,但需要宽度...
如果我设置了很大的宽度,我在小屏幕上的其他列就会减少。
发布于 2017-08-10 03:57:10
查看Column docs。相关的有:
flexGrow Number Flex grow style; defaults to 0
flexShrink Number Flex shrink style; defaults to 1
maxWidth Number Maximum width of column; this property will only be used if :flexGrow is greater than 0
minWidth Number Minimum width of column
width Number Flex basis (width) for this column; This value can grow or shrink based on flexGrow and flexShrink properties在这种情况下,我相信您只需要将flexGrow={1}添加到您的最后一个专栏中。Table使用弹性框布局。
FWIW这也是react-virtualized Table demo的工作方式。您可以查看其源代码here。
https://stackoverflow.com/questions/45596613
复制相似问题