256
Views
4
Comments
Solved
How to remove change of color on hover in a Table
Question

Hello, 

At this stage I tried everything to remove the change of color in my table:

this is the css of the table:


I found this solution on the forum: https://www.outsystems.com/forums/discussion/61348/disable-hover-color-change-retain-table-row-color-based-on-conditions/ 


But when I try 

the first code snippet 

tbody > tr:hover > td {    background-color: unset !important;    color: unset !important;}

I get this as a result:



The second snippet 

tbody {    pointer-events: none;}

gives a good result (no change color on hover), BUT I have 2 input fields in my table and then they are also disabled, so it's not a solution to my problem.

Thank you for your help!


Kr, 


UserImage.jpg
Shirley Grenelle
Solution

Hi all, 


the problem was resolved with this code:

Thanks for the help!



2020-08-31 05-04-40
Rahul Jain

Hello Shirley,

Can you please share OML File.

Thanks

--RJ--

2022-11-15 06-37-54
Ekjot Singh

Hello Shirley, 
May be you try to exempt the input parameter through CSS.

Please find the below link for your reference:
https://developer.mozilla.org/en-US/docs/Web/CSS/:not

Thanks

2021-03-18 21-03-15
Benjith Sam
 
MVP

Hi Shirley,

If the second snippet is blocking your req, then probably the below-mentioned tricky solution may help.

  • Wrap the TableRecords widget with a container, defined with a custom StyleClass, e.g. custTbl_style

  • Define the below CSS definition in the Style Sheet section
.custTbl_style .TableRecords tr:hover .TableRecords_OddLine,
.custTbl_style .TableRecords tr:hover .TableRecords_EvenLine {
    background-color: #fff;
}

See this sample screen: TableRowHoverTask

I hope this helps you!


Kind regards,

Benjith Sam

UserImage.jpg
Shirley Grenelle
Solution

Hi all, 


the problem was resolved with this code:

Thanks for the help!



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.