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, type: String,
default: '960px' default: '960px'
}, },
showHeaders: {
type: Boolean,
default: true
},
showGridlines: { showGridlines: {
type: Boolean, type: Boolean,
default: false default: false

View File

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

View File

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