fix: invalid discriminator dropdown behaviour with enum

This commit is contained in:
Roman Hotsiy 2020-08-24 12:03:44 +03:00
parent babae6098c
commit be07197e6d
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

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