代码之家  ›  专栏  ›  技术社区  ›  Max P

React虚拟化:如何仅使用minWidth

  •  0
  • Max P  · 技术社区  · 7 年前

    <Column /> minWidth ,但需要宽度。。。

    1 回复  |  直到 7 年前
        1
  •  2
  •   bvaughn    7 年前

    查看 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 使用flex box布局。

    react-virtualized Table demo 作品你可以看到它的源代码 here .