Skip to content

Commit

Permalink
fix extra search button
Browse files Browse the repository at this point in the history
  • Loading branch information
w-e-w committed Jul 17, 2023
1 parent 6438360 commit 543ea57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion javascript/extraNetworks.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function saveCardPreview(event, tabname, filename) {
}

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 text = button.classList.contains("search-all") ? "" : button.textContent.trim();

Expand Down
2 changes: 1 addition & 1 deletion modules/ui_extra_networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def create_html(self, tabname):
subdirs = {"": 1, **subdirs}

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")}
</button>
""" for subdir in subdirs])
Expand Down

0 comments on commit 543ea57

Please sign in to comment.