Material-table: How to enable row hovering?

Created on 11 Jan 2020  路  10Comments  路  Source: mbrn/material-table

Really liking this table, missing the material UI hover per row.. is there any way to use this feature with this table?

wontfix

All 10 comments

I was able to enable the hover feature by setting onRowClick={true} on the MaterialTable component.

This did add hover effects, but also makes the whole row look like it is linked (link pointer)

Add this line to your MaterialTable options:
options={{ rowStyle: { "&:hover": { backgroundColor: "#0000000f" } }}}

I was able to enable the hover feature by setting onRowClick={true} on the MaterialTable component.

Try onRowClick={() => null}

I was trying for the same thing, please let me know if you got it working

Tried with -

  1. onRowClick={true}
  2. onRowClick={() => null}
  3. options={{ rowStyle: { "&:hover": { backgroundColor: "#0000000f" } }}}

Option 1 and 2 are making cursor type as pointer, and option 3 isn't working

I was trying for the same thing, please let me know if you got it working

Tried with -

  1. onRowClick={true}
  2. onRowClick={() => null}
  3. options={{ rowStyle: { "&:hover": { backgroundColor: "#0000000f" } }}}

Option 1 and 2 are making cursor type as pointer, and option 3 isn't working

I use only onRowClick={()=>null} to enable row hover

this is example
Edit MaterialTableHover

@InfinityKn that example isn't working. what i'm trying to say is onRowClick={()=>null} gives hover functionality, but it makes the cursor as a pointer, which is not a good UX practice as row isn't clickable always.

The only way that I was able to disable the pointer cursor while having a onRowClick handler was to use a plain old CSS file imported that overwrites the classes.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

I'm trying to achieve the same as @fragmyte and @Davst , @arthurtyukayev can you share what you done to disable the pointer cursor?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jlgreene2 picture jlgreene2  路  3Comments

slevy85 picture slevy85  路  3Comments

ps1011 picture ps1011  路  3Comments

timrchavez picture timrchavez  路  3Comments

lazeebee picture lazeebee  路  3Comments