I'm using a v-data-table with expandable rows. I would like to get the value of a row when the expand arrow is clicked. I know I can use @click:row to get the value when the row is clicked, but specifically clicking on the arrow does not have the same effect. How do I get this value when directly clicking on the expand arrow?
v-data-table below which is fairly basic. I would like to call a method on expansion arrow click that takes the item/object from that row.
<v-data-table
:expanded.sync="expanded"
:headers="tableHeaders"
:items="myData"
:single-expand="true"
show-expand
>
{ text: "", value: "data-table-expand" }
There is a slot item:data-table-expand. You can put your own icon or button in the slot and add a click handler to it.