How to customize the Restore button (colvis).

How to customize the Restore button (colvis).

lenamtllenamtl Posts: 265Questions: 65Answers: 1
edited August 2022 in Free community support

Hi,

I'm looking for a way to customize the Restore button (colvis).
The restore button look like the column button and this is not very intuitive.

I would like to add an icon before the name or something that would make the icon look like different.
Any clue?

Ref
https://datatables.net/extensions/buttons/examples/column_visibility/restore.html
Note I'm using BS5

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    It has the class of buttons-colvisRestore which you can use to customise its styling and you can use the language option language.buttons.colvisRestore in the DataTables initialisation to customise the text.

    Allan

  • lenamtllenamtl Posts: 265Questions: 65Answers: 1

    Is there a way to add an icon / CSS in language....

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Answer ✓

    Yes:

    .buttons-colvisRstore::before {
      display: block;
      content: '...'; // change to a utf8 icon of your choice
    }
    

    Or you could just use the language option.

    Allan

Sign In or Register to comment.