fix: fix oneOf title for array

This commit is contained in:
Roman Hotsiy 2018-02-08 01:18:04 +02:00
parent ff3bb2461a
commit 1f3701d3a9
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -19,14 +19,14 @@ export class OneOfButton extends React.PureComponent<OneOfButtonProps> {
const { idx, schema, subSchema } = this.props;
return (
<StyledOneOfButton active={idx === schema.activeOneOf} onClick={this.activateOneOf}>
{subSchema.title || subSchema.displayType}
{subSchema.title || subSchema.typePrefix + subSchema.displayType}
</StyledOneOfButton>
);
}
activateOneOf() {
activateOneOf = () => {
this.props.schema.activateOneOf(this.props.idx);
}
};
}
@observer