Merge pull request #5950 from karpov159/feature-prop-showheaders

Feat(DataTable): added showHeaders prop to datatable
pull/6465/head
Tuğçe Küçükoğlu 2024-09-24 09:07:47 +03:00 committed by GitHub
commit 00186c9798
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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

@ -1164,6 +1164,11 @@ export interface DataTableProps {
* @defaultValue 960px
*/
breakpoint?: string | undefined;
/**
* Whether to display table headers
* @defaultValue true
*/
showHeaders?: boolean | undefined;
/**
* Whether to show grid lines between cells.
* @defaultValue false

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"