How to disable cell highlight when clicking it

How to disable cell highlight when clicking it

jaimef70jaimef70 Posts: 2Questions: 1Answers: 0
edited August 2023 in Free community support

I tried searching the forum and web for this question as it seems like somebody would have run across this.

I want to turn off the cell highlighting when a user clicks on a cell in the table. It currently puts a 1px border around it.

I'm using Datatables in a Bootstrap 5 theme package. I've attached a screenshot from the author's example page.

When I check DevTools, a class called "focus" is being added to the <TD> tag. Is that something I can turn off in DataTables or is that coming from the theme?

This question has an accepted answers - jump to answer

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    Check this site's examples to compare behaviours.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    Looks like you have KeyTables enabled on your DataTable. Remove the keys option from your table's initialisation if you don't want it.

    Allan

  • jaimef70jaimef70 Posts: 2Questions: 1Answers: 0

    Thanks! Setting the keys option to false resolved my issue.

Sign In or Register to comment.