bug: remove clearValidation from onTryoutClick (#5955)

This commit is contained in:
Tim Lai
2020-05-06 14:07:22 -07:00
committed by GitHub
parent 5eb23cdd48
commit 4542806af6
3 changed files with 38 additions and 2 deletions

View File

@@ -22,6 +22,12 @@ export default class Execute extends Component {
this.props.onExecute()
}
specActions.execute( { operation, path, method } )
} else {
// deferred by 40ms, to give element class change time to settle.
specActions.clearValidateParams( [path, method] )
setTimeout(() => {
specActions.validateParams([path, method])
}, 40)
}
}

View File

@@ -118,9 +118,7 @@ export default class OperationContainer extends PureComponent {
}
onTryoutClick =() => {
let { specActions, path, method } = this.props
this.setState({tryItOutEnabled: !this.state.tryItOutEnabled})
specActions.clearValidateParams([path, method])
}
onExecute = () => {