Skip to content

Commit

Permalink
added/removed thead slot
Browse files Browse the repository at this point in the history
  • Loading branch information
webdevnerdstuff committed May 11, 2024
1 parent 12a2db9 commit ec29267
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 20 deletions.
8 changes: 4 additions & 4 deletions packages/vuetify/src/components/VDataTable/VDataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ export const VDataTable = genericComponent<new <T extends readonly any[], V>(
default: () => slots.default ? slots.default(slotProps.value) : (
<>
{ slots.colgroup?.(slotProps.value) }
<VDataTableHeaders
{ ...dataTableHeadersProps }
v-slots={ slots }
/>
<VDataTableHeaders
{ ...dataTableHeadersProps }
v-slots={ slots }
/>
<tbody>
{ slots['body.prepend']?.(slotProps.value) }
{ slots.body ? slots.body(slotProps.value) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export const VDataTableHeaders = genericComponent<VDataTableHeadersSlots>()({
)
}
</thead>

{ slots.thead?.(slotProps.value) }
</>
)
})
Expand Down
12 changes: 4 additions & 8 deletions packages/vuetify/src/components/VDataTable/VDataTableServer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,10 @@ export const VDataTableServer = genericComponent<new <T extends readonly any[],
default: () => slots.default ? slots.default(slotProps.value) : (
<>
{ slots.colgroup?.(slotProps.value) }
<thead class="v-data-table__thead" role="rowgroup">
<VDataTableHeaders
{ ...dataTableHeadersProps }
sticky={ props.fixedHeader }
v-slots={ slots }
/>
</thead>
{ slots.thead?.(slotProps.value) }
<VDataTableHeaders
{ ...dataTableHeadersProps }
v-slots={ slots }
/>
<tbody class="v-data-table__tbody" role="rowgroup">
{ slots['body.prepend']?.(slotProps.value) }
{ slots.body ? slots.body(slotProps.value) : (
Expand Down
12 changes: 5 additions & 7 deletions packages/vuetify/src/components/VDataTable/VDataTableVirtual.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,11 @@ export const VDataTableVirtual = genericComponent<new <T extends readonly any[],
>
<table>
{ slots.colgroup?.(slotProps.value) }
<thead>
<VDataTableHeaders
{ ...dataTableHeadersProps }
sticky={ props.fixedHeader }
v-slots={ slots }
/>
</thead>
<VDataTableHeaders
{ ...dataTableHeadersProps }
sticky={ props.fixedHeader }
v-slots={ slots }
/>
<tbody>
<tr ref={ markerRef } style={{ height: convertToUnit(paddingTop.value), border: 0 }}>
<td colspan={ columns.value.length } style={{ height: 0, border: 0 }}></td>
Expand Down

0 comments on commit ec29267

Please sign in to comment.