mirror of
https://github.com/gosticks/react-table.git
synced 2026-09-24 01:50:18 +00:00
Fix useFlexLayout table min-width (#1924)
* Fix useFlexLayout table min-width * Delete .size-snapshot.json Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
This commit is contained in:
co-authored by
Tanner Linsley
parent
23c9ad23fa
commit
343e76ce65
@@ -1,5 +1,5 @@
|
||||
export function useFlexLayout(hooks) {
|
||||
hooks.getTableBodyProps.push(getTableBodyProps)
|
||||
hooks.getTableProps.push(getTableProps)
|
||||
hooks.getRowProps.push(getRowStyles)
|
||||
hooks.getHeaderGroupProps.push(getRowStyles)
|
||||
hooks.getHeaderProps.push(getHeaderProps)
|
||||
@@ -8,7 +8,7 @@ export function useFlexLayout(hooks) {
|
||||
|
||||
useFlexLayout.pluginName = 'useFlexLayout'
|
||||
|
||||
const getTableBodyProps = (props, { instance }) => [
|
||||
const getTableProps = (props, { instance }) => [
|
||||
props,
|
||||
{
|
||||
style: {
|
||||
@@ -33,7 +33,9 @@ const getHeaderProps = (props, { column }) => [
|
||||
{
|
||||
style: {
|
||||
boxSizing: 'border-box',
|
||||
flex: column.totalFlexWidth ? `${column.totalFlexWidth} 0 auto` : undefined,
|
||||
flex: column.totalFlexWidth
|
||||
? `${column.totalFlexWidth} 0 auto`
|
||||
: undefined,
|
||||
minWidth: `${column.totalMinWidth}px`,
|
||||
width: `${column.totalWidth}px`,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user