Column widths - Individual column searching (select inputs)
Column widths - Individual column searching (select inputs)
I have managed to implement a data table, with filtering, as per the following page:-
https://datatables.net/examples/api/multi_filter_select.html
I can size the columns using CSS or columnDefs-as long as I am making the columns wider than the longest item in the select filter control. However, I cannot make the columns narrower than the widest value in the select box.
Another colleague has created a dashboard and he has asked me to solve this problem. Some columns are really wide, for example, a notes column, where we want to reduce the width of the column (obviously, when you drop down the filter select box, that box will be wide and that's okay).
Thanks
Answers
See if this thread helps.
Kevin
My solution it works for me
initComplete: function () {
this.api().columns(3).every( function () {
var column = this;
var select = $('
')
.appendTo( ".dt-buttons" );
$( "#selectf" ).on( 'change', function () {
var val = $.fn.dataTable.util.escapeRegex(
$(this).val()
);