useFlexLayout
useFlexLayout
is a plugin hook that adds support for headers and cells to be rendered as inline-block
div
s (or other non-table elements) with width
being used as the flex-basis and flex-grow. This hook becomes useful when implementing both virtualized and resizable tables that must also be able to stretch to fill all available space.
NOTE: Although no additional options are needed for this plugin to work, the core column options width
, minWidth
and maxWidth
are used to calculate column and cell widths and must be set:
minWidth
is only used to limit column resizing. It does not define the minimum width for a column.width
is used as both the flex-basis
and flex-grow
. This means that it essentially acts as both the minimum width and flex-ratio of the column.maxWidth
is only used to limit column resizing. It does not define the maximum width for a column.See Column Options for more information on these options.
getRowProps
getCellProps
getHeaderGroupProps
getHeaderProps
getFooterGroupProps
getFooterProps
The best JavaScript newsletter! Delivered every Monday to over 76,000 devs.