You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you mean the class on the <tr>, not the <table>?
There isn't actually an option to change that in Select at the moment, but I can add that. I think the Bootstrap table-active class is a bit too subtle for the intention of Select, but I can certainly look at adding that option.
I mean the class name on the <tr> (which is .selected by default).
Or on the <td> if the select extension is configured to select cells instead of rows.
If you look at my previous link on Bootstrap documentation, the class .table-active is used on <tr> or <td> to highlight them.
So i think this is a better replacement to be used instead of the .selected class when working with Bootstrap 5.
I don't think you are doing anything wrong, it just does support setting a default yet. That is an oversight on my part and something that I need to address.
Activity
AllanJard commentedon Nov 7, 2024
Do you mean the class on the
<tr>, not the<table>?There isn't actually an option to change that in Select at the moment, but I can add that. I think the Bootstrap
table-activeclass is a bit too subtle for the intention of Select, but I can certainly look at adding that option.Seb33300 commentedon Nov 8, 2024
Hi @AllanJard,
I mean the class name on the
<tr>(which is.selectedby default).Or on the
<td>if the select extension is configured to select cells instead of rows.If you look at my previous link on Bootstrap documentation, the class
.table-activeis used on<tr>or<td>to highlight them.So i think this is a better replacement to be used instead of the
.selectedclass when working with Bootstrap 5.You already provide an option to change that class: https://datatables.net/reference/option/select.className
I tried to override the default value but it did not work:
I also tried:
Not sure what I am doing wrong.
Note: if I use that option directly when creating a datatable, it works.
But I would like to set it as the default value.
AllanJard commentedon Nov 8, 2024
I don't think you are doing anything wrong, it just does support setting a default yet. That is an oversight on my part and something that I need to address.