Skip to content

Commit ddde8aa

Browse files
committed
docs(VDataTable): clarify the importance of height prop
closes #20201
1 parent 0f72baf commit ddde8aa

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

packages/api-generator/src/locale/en/VDataTableHeaders.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"sortAscIcon": "Icon used for ascending sort button.",
77
"sortDescIcon": "Icon used for descending sort button.",
88
"sticky": "Deprecated, use `fixed-header` instead.",
9-
"fixedHeader": "Sticks the header to the top of the table.",
109
"headerProps": "Additional props to be be passed to the default header"
1110
},
1211
"slots": {

packages/api-generator/src/locale/en/VTable.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"description": "Replacement for native `<table>` HTML element. Lightweight alternative to `v-data-table`.",
33
"props": {
4-
"fixedFooter": "Use the fixed-footer prop together with the height prop to fix the footer to the bottom of the table.",
5-
"fixedHeader": "Use the fixed-header prop together with the height prop to fix the header to the top of the table.",
4+
"fixedFooter": "Makes the footer stick to the bottom of the table while scrolling. Requires the **height** prop.",
5+
"fixedHeader": "Makes the header stick to the top of the table while scrolling. Requires the **height** prop.",
66
"gridlines": "Controls cell borders\n- **horizontal** draws lines between rows\n- **vertical** between columns (keeps horizontal lines of header and footer rows)\n- **all** / `true` draws both vertical and horizontal lines\n- `false` removes all lines.",
77
"height": "Use the height prop to set the height of the table.",
88
"hover": "Will add a hover effect to a table's row when the mouse is over it.",

packages/docs/src/pages/en/components/data-tables/basics.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ Find more information and examples on the [Server side tables](/components/data-
5959

6060
The virtual variant of the data table relies, like the standard variant, on all data being available locally. But unlike the standard variant it uses virtualization to only render a small portion of the rows. This makes it well suited for displaying large data sets. It supports client-side sorting and filtering, but not pagination.
6161

62+
::: warning
63+
64+
When using virtualized variant of VDataTable, you have to set the **height** prop or constrain the table's height using custom CSS. Otherwise the table has no internal scroll area and will put all the rows in the DOM. This also applies to the **fixed-header** and **fixed-footer** props - those have no effect if the table **height** is unconstrained.
65+
66+
:::
67+
6268
| Component | Description |
6369
| - | - |
6470
| [v-data-table-virtual](/api/v-data-table-virtual/) | Primary Component |

0 commit comments

Comments
 (0)