why is the 'btn-primary' color not applied for datatables buttons?
why is the 'btn-primary' color not applied for datatables buttons?
hi team,
i stumbled across the following phenomenon:
by applying the className: 'btn btn-xxxxxx', i.e.
extend: 'selectedSingle',
className: 'btn btn-warning',
text: 'bearbeiten',
action: function (e, dt, node, config) {
editContact(dt);
}
}
datatables is changing the button color to all available bootstrap button colors BUT btn-primary! if i define 'btn btn-primary' the buttons stay in the datatables defaultt color: grey.
btw, this phenomenon applies also to the datatables 'csv, pdf, excel' buttons
am i doing something wrong or is it expected default behaviour?
cheers
tomek
This question has an accepted answers - jump to answer
Answers
It has
btn-secondary
as a default, so that is overriding yourprimary
.Do:
Example: https://live.datatables.net/guforosa/1/edit .
Allan
hi allan,
works like a charme!
thank you, very much appreciated.
cheers
toemk