make extra networks search case-insensitive

This commit is contained in:
AUTOMATIC 2023-01-22 10:30:55 +03:00
parent 837ec11828
commit 159f05314d

View File

@ -13,10 +13,10 @@ function setupExtraNetworksForTab(tabname){
tabs.appendChild(close)
search.addEventListener("input", function(evt){
searchTerm = search.value
searchTerm = search.value.toLowerCase()
gradioApp().querySelectorAll('#'+tabname+'_extra_tabs div.card').forEach(function(elem){
text = elem.querySelector('.name').textContent
text = elem.querySelector('.name').textContent.toLowerCase()
elem.style.display = text.indexOf(searchTerm) == -1 ? "none" : ""
})
});