question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Change the cursor to pointer when click:row event is attached in VDataTable

See original GitHub issue

Problem to solve

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.

Proposed solution

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; }

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:25
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

13reactions
CatsMiaowcommented, Jul 1, 2020

https://stackoverflow.com/a/61792596 The above code didn’t work for me

  • Vuetify v2.3.2
/* <v-data-table class="table-cursor"></v-data-table> */
.table-cursor tbody tr:hover {
  cursor: pointer;
}

I solved it with this code.

3reactions
drocha87commented, May 29, 2020

Ohh man the problem is that I was using scoped css! My bad, it really works!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set "cursor" to "pointer" on Vuetify <v-data-table> rows?
This is how you can override the rows of v-data-table component with a custom css ... <v-row style="cursor: pointer" @click="handleClick">.
Read more >
Introduction to events - Learn web development | MDN
Events are actions or occurrences that happen in the system you are programming, which the system tells you about so your code can...
Read more >
Tips and tricks in the debugger - Visual Studio - Microsoft Learn
To use this feature, click into your code with your cursor while paused in the debugger, make edits, and press F5, F10, or...
Read more >
Safari Technology Preview Release Notes - Apple Developer
Ignored Intl.NumberFormat feature options when linked-ICU is old (r278697); Optimized JSON.parse with small data by changing Identifier pool mechanism ...
Read more >
DataTable - PrimeVUE - PrimeFaces
DataTable provides single and multiple selection modes on click of a row. Selected rows are bound to the selection property and updated using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found