Lines 70-77
var dataTablesDefaults = {
Link Here
|
70 |
} |
70 |
} |
71 |
}; |
71 |
}; |
72 |
|
72 |
|
73 |
function toggledClearFilter(searchText, tableId){ |
73 |
function toggledClearFilter(searchText, tableId, searchFilters){ |
74 |
if( searchText == "" ){ |
74 |
if( searchText == "" && searchFilters === false ){ |
75 |
$("#" + tableId + "_wrapper").find(".dt_button_clear_filter").addClass("disabled"); |
75 |
$("#" + tableId + "_wrapper").find(".dt_button_clear_filter").addClass("disabled"); |
76 |
} else { |
76 |
} else { |
77 |
$("#" + tableId + "_wrapper").find(".dt_button_clear_filter").removeClass("disabled"); |
77 |
$("#" + tableId + "_wrapper").find(".dt_button_clear_filter").removeClass("disabled"); |
Lines 1007-1013
function _dt_add_delay(table_dt, table_node, delay_ms) {
Link Here
|
1007 |
// enable or disable the "Clear filter" button based on |
1007 |
// enable or disable the "Clear filter" button based on |
1008 |
// the presence of a search string |
1008 |
// the presence of a search string |
1009 |
this.on( 'search.dt', function ( e, settings ) { |
1009 |
this.on( 'search.dt', function ( e, settings ) { |
1010 |
toggledClearFilter(settings.oPreviousSearch.sSearch, tableId); |
1010 |
let searchFilters = settings.aoPreSearchCols.some(function (value) { |
|
|
1011 |
return value.sSearch != ""; |
1012 |
}); |
1013 |
toggledClearFilter(settings.oPreviousSearch.sSearch, tableId, searchFilters); |
1011 |
}); |
1014 |
}); |
1012 |
} |
1015 |
} |
1013 |
|
1016 |
|
1014 |
- |
|
|