table-hover stopped working

table-hover stopped working

cersoscersos Posts: 40Questions: 10Answers: 1

I just upgraded from 1.10.18 to 1.11.5. I have bootstrap 4.52, no change there.

All my tables lost the hovering provided by using the table-hover class.

Any suggestions?

Thank you,
Steve

Answers

  • kthorngrenkthorngren Posts: 20,275Questions: 26Answers: 4,765

    table-hover works in this example with DT 1.11.5 and BS4.
    http://live.datatables.net/bikogaci/1/edit

    Make sure you have all the correct atatbles BS4 styling integration files. Use the Download Builder for this. If you still need help please provide a link to your page or a test case replicating the issue so we can help debug.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • cersoscersos Posts: 40Questions: 10Answers: 1

    Kevin,
    Thanks for the reply. I did use the download builder. Nothing changed other than changing the version of DataTables.

    Unfortunately everything is internal, I'd love to provide a way to test.

    I still have 1.10.18. I checked, and all the *.bootstrap4.css files are the same. I switch back to the previous version and it works fine.

    Any suggestions?

    Steve

  • kthorngrenkthorngren Posts: 20,275Questions: 26Answers: 4,765

    Build or update my test case with your CSS to show the issue. Your specific data doesn't matter but there is something specific to your environment that is causing the issue.

    Kevin

  • cersoscersos Posts: 40Questions: 10Answers: 1

    I looked at your example and no hover, then I changed the class from hover to table-hover and it works great. It could be conflicting with one of the several other libraries I load. If there are any known issues, let me know.

    Thanks for your time, I'll keep digging.

    Steve

  • kthorngrenkthorngren Posts: 20,275Questions: 26Answers: 4,765

    That's odd I thought all I had was table-hover without any other classes :smile:

    I believe the hover CSS is found in the boostrap.css not in any of the Datatables files. For testing you can try commenting out the Datatables init code to see is the hover works with a plain HTMl table. If its still not working see if Stack Overflow has any ideas.

    Maybe its working but just very light and not noticeable. Try a test by setting a color that is noticeable, like this:

    .table-hover > tbody > tr:hover {
      background-color: red;
    }
    

    http://live.datatables.net/bikogaci/4/edit

    Kevin

Sign In or Register to comment.