Skip to content

Commit

Permalink
Hover effect on rows only when needed (#426)
Browse files Browse the repository at this point in the history
Add hover effect to the row only when onRowClick or onRowDoubleClick are specified.

https://material-table-core.com/demos/sort/basic
  • Loading branch information
chris-jalon committed Dec 16, 2021
1 parent 8ea10b5 commit 62117c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/MTableBodyRow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ export default function MTableBodyRow(props) {
}
handleOnRowClick(event);
}}
hover={onRowClick !== null || onRowDoubleClick !== null}
hover={onRowClick || onRowDoubleClick}
style={getStyle(props.index, props.level)}
>
{renderColumns}
Expand Down

0 comments on commit 62117c5

Please sign in to comment.