How apply a Bootstrap 5 class to buttons in layout.
How apply a Bootstrap 5 class to buttons in layout.
bbrindza
Posts: 316Questions: 73Answers: 1
in DataTables 2
How apply a Bootstrap 5 class to the buttons ( ie. btn btn-sm) in the the layout .
layout: {
top2Start: 'pageLength',
topStart: 'buttons',
topEnd: 'search',
bottomStart: 'info',
bottomEnd: 'paging'
},
This question has an accepted answers - jump to answer
Answers
Assuming you have imported the Bootstrap 5 integration for Buttons, it will automatically get Bootstrap 5 classes. That is either the
datatables.net-buttons-bs5
module if you are doing ES imports, orbuttons.bootstrap5.js
if you are including the JS directly.The default is
btn btn-secondary
. If you want to change the default, you can do so with:Allan
Ok , so basically added this to the JS to override the default?
If you want
btn btn-sm
for all buttons, then yes.Allan
Thanks again Guru