fix: exchange function name of component Try-it-out (#4687)
This commit is contained in:
@@ -21,8 +21,8 @@ export default class TryItOutButton extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<div className="try-out">
|
<div className="try-out">
|
||||||
{
|
{
|
||||||
enabled ? <button className="btn try-out__btn cancel" onClick={ onTryoutClick }>Cancel</button>
|
enabled ? <button className="btn try-out__btn cancel" onClick={ onCancelClick }>Cancel</button>
|
||||||
: <button className="btn try-out__btn" onClick={ onCancelClick }>Try it out </button>
|
: <button className="btn try-out__btn" onClick={ onTryoutClick }>Try it out </button>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -113,11 +113,11 @@ export default class OperationContainer extends PureComponent {
|
|||||||
layoutActions.show(["operations", tag, operationId], !isShown)
|
layoutActions.show(["operations", tag, operationId], !isShown)
|
||||||
}
|
}
|
||||||
|
|
||||||
onTryoutClick =() => {
|
onCancelClick=() => {
|
||||||
this.setState({tryItOutEnabled: !this.state.tryItOutEnabled})
|
this.setState({tryItOutEnabled: !this.state.tryItOutEnabled})
|
||||||
}
|
}
|
||||||
|
|
||||||
onCancelClick =() => {
|
onTryoutClick =() => {
|
||||||
let { specActions, path, method } = this.props
|
let { specActions, path, method } = this.props
|
||||||
this.setState({tryItOutEnabled: !this.state.tryItOutEnabled})
|
this.setState({tryItOutEnabled: !this.state.tryItOutEnabled})
|
||||||
specActions.clearValidateParams([path, method])
|
specActions.clearValidateParams([path, method])
|
||||||
|
|||||||
Reference in New Issue
Block a user