diff --git a/docs/content/2.components/table.md b/docs/content/2.components/table.md index f747feff21..34e21e3cdd 100644 --- a/docs/content/2.components/table.md +++ b/docs/content/2.components/table.md @@ -29,6 +29,7 @@ Use the `columns` prop to configure which columns to display. It's an array of o - `sortable` - Whether the column is sortable. Defaults to `false`. - `direction` - The sort direction to use on first click. Defaults to `asc`. - `class` - The class to apply to the column cells. +- `rowClass` - The class to apply to the data column cells. - `sort` - Pass your own `sort` function. Defaults to a simple _greater than_ / _less than_ comparison. ::component-example{class="grid"} diff --git a/src/runtime/components/data/Table.vue b/src/runtime/components/data/Table.vue index e85c0ecbc1..9fc69aa8d4 100644 --- a/src/runtime/components/data/Table.vue +++ b/src/runtime/components/data/Table.vue @@ -66,7 +66,7 @@ - + {{ getRowData(row, column.key) }} @@ -119,6 +119,7 @@ interface Column { sort?: (a: any, b: any, direction: 'asc' | 'desc') => number direction?: 'asc' | 'desc' class?: string + rowClass?: string [key: string]: any }