How to access row data on hover? #659
Replies: 2 comments
-
@Domino987 Friendly ping if you get the time to look at this need. |
Beta Was this translation helpful? Give feedback.
-
I know this is really, old, but until they actually do work on the project, and MAYBE add this functionality... If it's to change the style of the hovered row, create a theme to handle it. I suspect though that this is not what you're wanting to do. If it's not a style change thing, your best bet is to handle the onMouseEnter event on the table and use the mouse coordinates to determine what element is being hovered over. If your intent is to somehow change what's displayed on the page to reflect the hovered row, you'll probably also have to handle onMouseLeave to undo whatever visible change was made. Another idea that might be a better option is to create a custom Row component, and add the even handlers described to that component. At that point, you'll have direct access to the underlying data as well as the itself (this is probably how I'd approach it). Keep in mind that I'm just a grunt dev user like you, and am not involved in the project. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am looking for the equivalent of onRowClick: onRowHover.
My use case is to display additional metadata of the row on hover (via a tooltip)
I tried onRowSelected but that's not it.
Note that there is two complementary use:
get the row data on hover.
a second need would be to provide a domref or a unique CSS class/id of the current row (note that simply providing the row number relative to the first one, could be enough)
given this a library user can style the specific row accordingly e.g. with the relative number one can do :nth-child(nbr)
Beta Was this translation helpful? Give feedback.
All reactions