Skip to content

Commit 02bf886

Browse files
author
Erwin Dondorp
committed
hide the search-box when refreshing the panel
1 parent 2bbeab3 commit 02bf886

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

saltgui/static/scripts/Utils.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,9 @@ export class Utils {
309309
Utils._updateTableFilter(pTable, "", menuItems);
310310
} else if (pAction === "refresh") {
311311
Utils._updateTableFilter(pTable, input.value, menuItems);
312+
} else if (pAction === "hide") {
313+
Utils._updateTableFilter(pTable, "", menuItems);
314+
pSearchBlock.style.display = "none";
312315
} else if (pSearchBlock.style.display === "none") {
313316
Utils._updateTableFilter(pTable, input.value, menuItems);
314317
pSearchBlock.style.display = "";

saltgui/static/scripts/panels/Panel.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ export class Panel {
175175
if (this.div.querySelector(".search-button") !== null) {
176176
const searchBox = Utils.makeSearchBox(this.searchButton, table, pFieldList);
177177
this.div.appendChild(searchBox);
178+
this.searchBox = searchBox;
178179
}
179180

180181
this.div.appendChild(table);
@@ -725,5 +726,9 @@ export class Panel {
725726
for (const tr of document.querySelectorAll("#error-row")) {
726727
tr.parentElement.remove(tr);
727728
}
729+
730+
if (this.searchBox && this.table) {
731+
Utils.hideShowTableSearchBar(this.searchBox, this.table, "hide");
732+
}
728733
}
729734
}

0 commit comments

Comments
 (0)