Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/api-generator/src/locale/en/VDataTable.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"item.data-table-select": "Slot to replace the default `v-checkbox-btn` used when selecting rows.",
"item.data-table-expand": "Slot to replace the default `v-icon` used when expanding rows.",
"item.<name>": "Slot to customize a specific column.",
"item.prepend": "Slot to add content before each row.",
"loading": "Defines content for when `loading` is true and no items are provided.",
"tbody": "Slot to replace the default table `<tbody>`.",
"thead": "Slot to replace the default table `<thead>`.",
Expand Down
1 change: 1 addition & 0 deletions packages/api-generator/src/locale/en/VDataTableRows.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"group-summary": "Slot for custom rendering of a group summary.",
"item.data-table-expand": "Slot for custom rendering of a row cell with the expand icon.",
"item.data-table-select": "Slot for custom rendering of a row cell with the select checkbox.",
"item.prepend": "Slot to add content before each row.",
"loading": "Slot for custom rendering of the loading state."
}
}
3 changes: 3 additions & 0 deletions packages/vuetify/src/components/VDataTable/VDataTableRows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export type VDataTableRowsSlots<T> = VDataTableGroupHeaderRowSlots & VDataTableR
'group-summary': GroupSummarySlot
'no-data': never
'expanded-row': ItemSlot<T>
'item.prepend': ItemSlot<T>
}

export const makeVDataTableRowsProps = propsFactory({
Expand Down Expand Up @@ -180,6 +181,8 @@ export const VDataTableRows = genericComponent<new <T>(

return (
<Fragment key={ itemSlotProps.props.key as string }>
{ slots['item.prepend']?.(slotProps) }

{ slots.item ? slots.item(itemSlotProps) : (
<VDataTableRow
{ ...itemSlotProps.props }
Expand Down