Skip to content

Commit

Permalink
fix: ensure order of fixed select
Browse files Browse the repository at this point in the history
fixes #61
  • Loading branch information
danielo515 committed Oct 10, 2023
1 parent 7074c5e commit 62b407e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/FormModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,13 @@ export class FormModal extends Modal {
switch (source) {
case "fixed":
return fieldBase.addDropdown((element) => {
const options = fieldInput.options.reduce(
fieldInput.options.forEach(
(
acc: Record<string, string>,
option
) => {
acc[option.value] = option.label;
return acc;
element.addOption(option.value, option.label);
},
{}
);
element.addOptions(options);
this.formResult[definition.name] = element.getValue();
element.onChange(async (value) => {
this.formResult[definition.name] =
Expand Down

0 comments on commit 62b407e

Please sign in to comment.