fix: discriminator dropdown showing incorrect field if sorted

This commit is contained in:
Roman Hotsiy 2018-03-05 12:50:25 +02:00
parent 3924d3c1be
commit bcf39dc2cf
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -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} />
);
}