Skip to content

Commit

Permalink
fix: invalid discriminator dropdown behaviour with enum
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy committed Aug 24, 2020
1 parent babae60 commit be07197
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/Schema/DiscriminatorDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,12 @@ export class DiscriminatorDropdown extends React.Component<{
};
});

const activeValue = options[parent.activeOneOf].value;

this.sortOptions(options, enumValues);

return (
<StyledDropdown
value={options[parent.activeOneOf].value}
options={options}
onChange={this.changeActiveChild}
/>
<StyledDropdown value={activeValue} options={options} onChange={this.changeActiveChild} />
);
}

Expand Down

0 comments on commit be07197

Please sign in to comment.