fix extra search button

This commit is contained in:
w-e-w 2023-07-17 16:15:52 +09:00
parent 643836007f
commit 543ea5730b
2 changed files with 2 additions and 2 deletions

View File

@ -177,7 +177,7 @@ function saveCardPreview(event, tabname, filename) {
} }
function extraNetworksSearchButton(tabs_id, event) { function extraNetworksSearchButton(tabs_id, event) {
var searchTextarea = gradioApp().querySelector("#" + tabs_id + ' > div > textarea'); var searchTextarea = gradioApp().querySelector("#" + tabs_id + ' > label > textarea');
var button = event.target; var button = event.target;
var text = button.classList.contains("search-all") ? "" : button.textContent.trim(); var text = button.classList.contains("search-all") ? "" : button.textContent.trim();

View File

@ -163,7 +163,7 @@ class ExtraNetworksPage:
subdirs = {"": 1, **subdirs} subdirs = {"": 1, **subdirs}
subdirs_html = "".join([f""" subdirs_html = "".join([f"""
<button class='lg secondary gradio-button custom-button{" search-all" if subdir=="" else ""}' onclick='extraNetworksSearchButton("{tabname}_extra_tabs", event)'> <button class='lg secondary gradio-button custom-button{" search-all" if subdir=="" else ""}' onclick='extraNetworksSearchButton("{tabname}_extra_search", event)'>
{html.escape(subdir if subdir!="" else "all")} {html.escape(subdir if subdir!="" else "all")}
</button> </button>
""" for subdir in subdirs]) """ for subdir in subdirs])