When a user currently hover over a table row and the row has a click event attached to it, the user will only recognize that there is an action, when he know the functionallity or clicked the row by accident.
There should be any visual change for the user, to let him know there is some action he can trigger.
Check if the 'click:row' event is attached to the component and add a class while generate the Row element, which change the cursor to pointer.
Can be done by extending the genDefaultSimpleRow function in VDataTable
class: {
...classes,
'v-data-table__selected': data.isSelected,
'v-clickable': this.$listeners && this.$listeners['click:row'],
},
.v-clickable { cursor: pointer; }
Until this is implemented: Does anyone have a nice workaround?
Until this is implemented: Does anyone have a nice workaround?
I'm wondering about a workaround too!!
since click:row applies for each row you can just apply cursor:pointer style to table>tbody>tr
since click:row applies for each row you can just apply cursor:pointer style to table>tbody>tr
This was my first guess, but it doesn't work.
Ohh man the problem is that I was using scoped css! My bad, it really works!
https://stackoverflow.com/a/61792596
The above code didn't work for me
/* <v-data-table class="table-cursor"></v-data-table> */
.table-cursor tbody tr:hover {
cursor: pointer;
}
I solved it with this code.
Most helpful comment
https://stackoverflow.com/a/61792596
The above code didn't work for me
I solved it with this code.