diff --git a/src/views/datatable/DataTableDoc.vue b/src/views/datatable/DataTableDoc.vue index 3d27982d2..895be3d7d 100755 --- a/src/views/datatable/DataTableDoc.vue +++ b/src/views/datatable/DataTableDoc.vue @@ -907,7 +907,15 @@ matchModes: [ -
Scrollable table uses flex layout in vertical scrolling with auto size. As a result use flex property when giving + a width to a column. When horizontal scrolling is enabled, this is not a requirement as columns in horizontal scrolling do not have auto size.
+
+<Column field="vin" header="Vin" style="flex: 0 0 4rem"></Column>
+
+
+
+ In cases where viewport should adjust itself according to the table parent's height instead of a fixed viewport height, set scrollHeight option as flex. In example below, table is inside a Dialog where viewport size dynamically responds to the dialog size changes such as maximizing.
<Button label="Show" icon="pi pi-external-link" @click="openDialog" />
@@ -926,7 +934,7 @@ matchModes: [
- FlexScroll can also be used for cases where scrollable viewport should be responsive with respect to the window size. See the
<div style="height: calc(100vh - 143px)">
@@ -940,7 +948,7 @@ matchModes: [
- For horizontal scrolling only, it is required to set scrollDirection to "horizontal" and give widths to columns.
<DataTable :value="customers" :scrollable="true" scrollDirection="horizontal">
@@ -957,7 +965,7 @@ matchModes: [
- Set scrollDirection to "both" and give widths to columns to scroll both ways.
<DataTable :value="customers" :scrollable="true" scrollHeight="400px" scrollDirection="both">
@@ -974,7 +982,7 @@ matchModes: [
- Frozen rows are used to fix certain rows while scrolling, this data is defined with the frozenValue property.
@@ -987,7 +995,7 @@ matchModes: [
- Certain columns can be frozen by using the frozen property of the column component. In addition alignFrozen is available to define whether the column should be fixed on the left or right.