mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-14 04:46:34 +03:00
fix: fix oneOf title for array
This commit is contained in:
parent
ff3bb2461a
commit
1f3701d3a9
|
@ -19,14 +19,14 @@ export class OneOfButton extends React.PureComponent<OneOfButtonProps> {
|
||||||
const { idx, schema, subSchema } = this.props;
|
const { idx, schema, subSchema } = this.props;
|
||||||
return (
|
return (
|
||||||
<StyledOneOfButton active={idx === schema.activeOneOf} onClick={this.activateOneOf}>
|
<StyledOneOfButton active={idx === schema.activeOneOf} onClick={this.activateOneOf}>
|
||||||
{subSchema.title || subSchema.displayType}
|
{subSchema.title || subSchema.typePrefix + subSchema.displayType}
|
||||||
</StyledOneOfButton>
|
</StyledOneOfButton>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
activateOneOf() {
|
activateOneOf = () => {
|
||||||
this.props.schema.activateOneOf(this.props.idx);
|
this.props.schema.activateOneOf(this.props.idx);
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
|
|
Loading…
Reference in New Issue
Block a user