Skip to content

Commit

Permalink
Merge pull request #56 from ZyrenthDevelopment/main
Browse files Browse the repository at this point in the history
support for disabled dropdowns
  • Loading branch information
Govorunb authored Jul 7, 2024
2 parents f0ffbd8 + d57eebc commit f343818
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/www/src/modules/modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ async function addDropdown(modal: HTMLElement, param: EnumParam) {
for (let i = 0; i < options.length; i++) {
const option = document.createElement("option");
option.value = i.toString();
option.textContent = options[i];
option.disabled = options[i].startsWith('[DISABLED] ');
option.textContent = options[i].replace(/\[DISABLED\] /g, '');
select.appendChild(option);
}

Expand Down

0 comments on commit f343818

Please sign in to comment.