Skip to content

Commit 35a2f23

Browse files
chore(docs): mention in table docs that fixed and responsive do not work well with each other (closes bootstrap-vue#4598) (bootstrap-vue#4677)
Co-authored-by: Troy Morehouse <troymore@nbnet.nb.ca>
1 parent e02d70b commit 35a2f23

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/components/table/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,21 @@ values: `sm`, `md`, `lg`, or `xl`.
575575
- _Possible vertical clipping/truncation_. Responsive tables make use of `overflow-y: hidden`, which
576576
clips off any content that goes beyond the bottom or top edges of the table. In particular, this
577577
may clip off dropdown menus and other third-party widgets.
578+
- Using props `responsive` and `fixed` together will **not** work as expected. Fixed table layout
579+
uses the first row (table header in this case) to compute the width required by each column (and
580+
the overall table width) to fit within the width of the parent container &mdash; without taking
581+
cells in the `<tbody>` into consideration &mdash; resulting in table that may not be resposive. To
582+
get around this limitation, you would need to specify widths for the columns (or certain columns)
583+
via one of the following methods:
584+
- Use `<col>` elements within the [`table-colgroup` slot](#table-colgroup) that have widths set
585+
(e.g. `<col style="width: 20rem">`), or
586+
- Wrap header cells in `<div>` elements, via the use of
587+
[custom header rendering](#header-and-footer-custom-rendering-via-scoped-slots), which have a
588+
minimum width set on them, or
589+
- Use the `thStyle` property of the [field definition object](#field-definition-reference) to
590+
set a width for the column(s), or
591+
- Use custom CSS to define classes to apply to the columns to set widths, via the `thClass` or
592+
`class` properties of the [field definition object](#field-definition-reference).
578593

579594
### Stacked tables
580595

0 commit comments

Comments
 (0)