Skip to content

Commit

Permalink
fix using brand new loras immediately after adding them
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Sep 17, 2023
1 parent 7eab271 commit 3bc8251
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/wwwroot/js/genpage/params.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,14 @@ function refreshParameterValues(callback = null) {
}
dropdown.innerHTML = html;
}
else if (param.type == "list" && param.values) {
let listElem = getRequiredElementById(`input_${param.id}`);
let listOpts = [...listElem.options].map(o => o.value);
let newVals = param.values.filter(v => !listOpts.includes(v));
for (let val of newVals) {
$(listElem).append(new Option(val, val, false, false));
}
}
}
if (callback) {
callback();
Expand Down

0 comments on commit 3bc8251

Please sign in to comment.