Skip to content

about Table web component row hover issue #2748

Closed Answered by MarcusNotheis
LucyGit asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @LucyGit,

you are referring to the <Table /> component, right?
The easiest way of adding on hover effect for the rows is setting the mode prop to SingleSelect or MultiSelect:
https://sap.github.io/ui5-webcomponents-react/iframe.html?args=mode:SingleSelect&id=data-display-table--default-story&viewMode=story

Or do you have a use case where you want to have the hover effect for the rows without the possibility to click on a column?
In this case, you would need to make use of the CSS Parts of the Row:

In your css:

.tableRowWithHover::part(row):hover {
  background-color: var(--sapList_Hover_Background);
}

in your component:

<Table>
  <TableRow className="tableRowWithHover">
   {/* your ce…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MarcusNotheis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants