Disable sort order dropdown pointer events while refresh is running

Doesn't prevent keyboard focus, but changing the values there is much slower since the list doesn't stay open.
pull/253/head
DominikDoom 2023-09-13 22:30:37 +02:00
parent d8d991531a
commit 3e33169a3a
1 changed files with 5 additions and 0 deletions

View File

@ -273,7 +273,12 @@ async function syncOptions() {
// Refresh temp files if model sort order changed
// Contrary to the other loads, this one shouldn't happen on a first time load
if (TAC_CFG && newCFG.modelSortOrder !== TAC_CFG.modelSortOrder) {
const dropdown = gradioApp().querySelector("#setting_tac_modelSortOrder");
dropdown.style.opacity = 0.5;
dropdown.style.pointerEvents = "none";
await refreshTacTempFiles(true);
dropdown.style.opacity = null;
dropdown.style.pointerEvents = null;
}
// Update CSS if maxResults changed