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.
This commit is contained in:
DominikDoom
2023-09-13 22:30:37 +02:00
parent d8d991531a
commit 3e33169a3a

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