Vuetify: [Documentation] Data Table - Need documentation on how to use `expanded-item` slot when also using custom `body` slot

Created on 1 Aug 2019  路  1Comment  路  Source: vuetifyjs/vuetify

Problem to solve

Ability to use custom Body slot template in a data table, as well as the custom expanded-item slot. I assume this is possible, but the documentation does not have an example or mention how it can be done. Here is a code pen with 2 tables. The one on top won't expand because it is using a custom body. The one on bottom is not using a custom body and it does expand as expected.

https://codepen.io/lucille2/pen/jgwBBN/

I would think that EITHER the expanded-item slot would work out of the box with a custom body row OR there would be a snippet of code you could add to your custom row for the expanded section.

Proposed solution

Provide documentation on how it is done. (If it can be.)

documentation

Most helpful comment

It is not possible to use expanded-item slot when using body slot. body slot takes over the internal rendering completely, and so you will have to implement things like expanded slot, or selection checkboxes yourself.

This should probably be emphasised somewhere in the documentation.

It should be mentioned that in many situations it's probably not even necessary to use the body slot, but instead use either the item slot or the item.<column> slots.

>All comments

It is not possible to use expanded-item slot when using body slot. body slot takes over the internal rendering completely, and so you will have to implement things like expanded slot, or selection checkboxes yourself.

This should probably be emphasised somewhere in the documentation.

It should be mentioned that in many situations it's probably not even necessary to use the body slot, but instead use either the item slot or the item.<column> slots.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aaronjpitts picture aaronjpitts  路  3Comments

itanka9 picture itanka9  路  3Comments

paladin2005 picture paladin2005  路  3Comments

efootstep picture efootstep  路  3Comments

gluons picture gluons  路  3Comments