Buttons "className" issue

Buttons "className" issue

scotsscriptsscotsscripts Posts: 11Questions: 5Answers: 0

I'm using datatables for bs5 and trying to change the buttons styling with the className setting.

When I add bs5 classes (btn btn-sm btn-outline-secondary) it's not overriding the original button style so all I get is a small gray square instead of a small white button with a gray outline. Is there a way to completely override the original button style in the datatables settings?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin
    Answer ✓

    Use:

    DataTable.Buttons.defaults.dom.button.className = ‘btn’;
    

    to se the base value. (This is the default).

    Allan

Sign In or Register to comment.