Skip to content

Commit

Permalink
[docs] Fix virtualized table column resizing (#36066)
Browse files Browse the repository at this point in the history
Co-authored-by: Olivier Tassinari <[email protected]>
Co-authored-by: ZeeshanTamboli <[email protected]>
  • Loading branch information
3 people authored Feb 13, 2023
1 parent 5f9638d commit 749bde0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ const VirtuosoTableComponents = {
Scroller: React.forwardRef((props, ref) => (
<TableContainer component={Paper} {...props} ref={ref} />
)),
Table: (props) => <Table {...props} style={{ borderCollapse: 'separate' }} />,
Table: (props) => (
<Table {...props} sx={{ borderCollapse: 'separate', tableLayout: 'fixed' }} />
),
TableHead,
TableRow: ({ item: _item, ...props }) => <TableRow {...props} />,
TableBody: React.forwardRef((props, ref) => <TableBody {...props} ref={ref} />),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ const VirtuosoTableComponents: TableComponents<Data> = {
Scroller: React.forwardRef<HTMLDivElement>((props, ref) => (
<TableContainer component={Paper} {...props} ref={ref} />
)),
Table: (props) => <Table {...props} style={{ borderCollapse: 'separate' }} />,
Table: (props) => (
<Table {...props} sx={{ borderCollapse: 'separate', tableLayout: 'fixed' }} />
),
TableHead,
TableRow: ({ item: _item, ...props }) => <TableRow {...props} />,
TableBody: React.forwardRef<HTMLTableSectionElement>((props, ref) => (
Expand Down

0 comments on commit 749bde0

Please sign in to comment.