added showHeaders prop to datatable

pull/5950/head
Maxim Karpov 2024-06-22 22:18:05 +03:00
parent 40063466fb
commit 7ab50d18d6
3 changed files with 10 additions and 0 deletions

View File

@ -238,6 +238,10 @@ export default {
type: String,
default: '960px'
},
showHeaders: {
type: Boolean,
default: true
},
showGridlines: {
type: Boolean,
default: false

View File

@ -1168,6 +1168,11 @@ export interface DataTableProps {
* Whether to show grid lines between cells.
* @defaultValue false
*/
showHeaders?: boolean | undefined;
/**
* Whether to display table headers
* @defaultValue true
*/
showGridlines?: boolean | undefined;
/**
* Whether to displays rows with alternating colors.

View File

@ -70,6 +70,7 @@
<template #content="slotProps">
<table ref="table" role="table" :class="[cx('table'), tableClass]" :style="[tableStyle, slotProps.spacerStyle]" v-bind="{ ...tableProps, ...ptm('table') }">
<DTTableHeader
v-if="showHeaders"
:columnGroup="headerColumnGroup"
:columns="slotProps.columns"
:rowGroupMode="rowGroupMode"