Merge pull request #5950 from karpov159/feature-prop-showheaders
Feat(DataTable): added showHeaders prop to datatablepull/6465/head
commit
00186c9798
|
@ -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
|
||||||
|
|
|
@ -1164,6 +1164,11 @@ export interface DataTableProps {
|
||||||
* @defaultValue 960px
|
* @defaultValue 960px
|
||||||
*/
|
*/
|
||||||
breakpoint?: string | undefined;
|
breakpoint?: string | undefined;
|
||||||
|
/**
|
||||||
|
* Whether to display table headers
|
||||||
|
* @defaultValue true
|
||||||
|
*/
|
||||||
|
showHeaders?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Whether to show grid lines between cells.
|
* Whether to show grid lines between cells.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue