diff --git a/explorer/src/js/query-list.js b/explorer/src/js/query-list.js index cd936441..0646dcb8 100644 --- a/explorer/src/js/query-list.js +++ b/explorer/src/js/query-list.js @@ -9,6 +9,14 @@ function searchFocus() { searchElement.focus(); } } +function expandAll(param) { + const searchTerm = document.querySelector('.search').value; + if (searchTerm.trim() !== "") { + document.querySelectorAll('.collapse').forEach(function (element) { + element.classList.add('show'); + }); + } +} export function setupQueryList() { document.querySelectorAll('.query_favorite_toggle').forEach(function (element) { @@ -17,7 +25,10 @@ export function setupQueryList() { let options = { valueNames: ['sort-name', 'sort-created', 'sort-created', 'sort-last-run', 'sort-run-count', 'sort-connection'], - handlers: {'updated': [searchFocus]} + handlers: {'updated': [searchFocus], + 'searchComplete': [expandAll]}, + searchDelay: 250, + searchColumns: ['sort-name'] }; new List('queries', options); diff --git a/explorer/templates/explorer/query_list.html b/explorer/templates/explorer/query_list.html index fc55a5dd..98c18125 100644 --- a/explorer/templates/explorer/query_list.html +++ b/explorer/templates/explorer/query_list.html @@ -69,18 +69,18 @@