Skip to content

Commit

Permalink
rebuild dataTable after ontoloy search. issue #487
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouji2013 committed May 18, 2021
1 parent 594dcf1 commit a116140
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions web/src/main/webapp/js/ctd2.js
Original file line number Diff line number Diff line change
Expand Up @@ -3054,6 +3054,7 @@
let submission_count = 0;
let center_count = 0;
const subject_result = ontology_search_results.subject_result;
$("#search-results-grid").DataTable().destroy();
_.each(subject_result, function (one_result) {
if (subject_names.includes(one_result.dashboardEntity.displayName)) return;
if (one_result.dashboardEntity.organism == undefined) {
Expand Down Expand Up @@ -3099,6 +3100,23 @@
});
});
});
$("#search-results-grid").dataTable({
"columns": [
null,
null,
null,
null,
null,
{
"orderDataType": "dashboard-rank",
"type": 'num',
},
]
}).fnSort([
[5, 'desc'],
[1, 'asc']
]);
$("#search-results-grid").parent().find('input[type=search]').popover(table_filter_popover);
$("#ontology-search").prop('disabled', true);

//redo observations
Expand Down

0 comments on commit a116140

Please sign in to comment.