Skip to content

Commit

Permalink
fix: discriminator dropdown showing incorrect field if sorted
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy committed Mar 5, 2018
1 parent 3924d3c commit bcf39dc
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/components/Schema/DiscriminatorDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,11 @@ export class DiscriminatorDropdown extends React.Component<{
};
});

const activeItem = options[parent.activeOneOf];
this.sortOptions(options, enumValues);

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

Expand Down

0 comments on commit bcf39dc

Please sign in to comment.