Skip to content

Commit 3bc8251

Browse files
committed
fix using brand new loras immediately after adding them
1 parent 7eab271 commit 3bc8251

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/wwwroot/js/genpage/params.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,14 @@ function refreshParameterValues(callback = null) {
438438
}
439439
dropdown.innerHTML = html;
440440
}
441+
else if (param.type == "list" && param.values) {
442+
let listElem = getRequiredElementById(`input_${param.id}`);
443+
let listOpts = [...listElem.options].map(o => o.value);
444+
let newVals = param.values.filter(v => !listOpts.includes(v));
445+
for (let val of newVals) {
446+
$(listElem).append(new Option(val, val, false, false));
447+
}
448+
}
441449
}
442450
if (callback) {
443451
callback();

0 commit comments

Comments
 (0)