Skip to content

Commit

Permalink
Fix empty jobs and job report tables if used search filters
Browse files Browse the repository at this point in the history
  • Loading branch information
ganiuszka committed Oct 26, 2024
1 parent bfa2934 commit 6a34312
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Web/Pages/JobList.page
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ var oJobHistoryList = {
this.table.columns().draw();
},
set_filters: function(type) {
const ptype = get_url_param('type');;
const ptype = get_url_param('type');
type = type || ptype;
var search_func;
switch (type) {
Expand Down Expand Up @@ -685,7 +685,13 @@ var oJobHistoryList = {
break;
}
if (search_func) {
$.fn.dataTable.ext.search.push(search_func);
const search_func_all = (settings, search_data, index, row_data, counter) => {
if (settings.nTable.id !== this.ids.job_list) {
return true;
}
return search_func(settings, search_data, index, row_data, counter);
};
$.fn.dataTable.ext.search.push(search_func_all);
if (ptype) {
// if type parameter passed in the URL query string, reset all filters (@see search(''))
this.table.columns().search('').draw();
Expand Down

0 comments on commit 6a34312

Please sign in to comment.