How apply a Bootstrap 5 class to buttons in layout.
How apply a Bootstrap 5 class to buttons in layout.
bbrindza
Posts: 329Questions: 78Answers: 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
This discussion has been closed.
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-bs5module if you are doing ES imports, orbuttons.bootstrap5.jsif 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-smfor all buttons, then yes.Allan
Thanks again Guru