Remove Response update logic; dispatch changeProducesValue correctly

This commit is contained in:
Kyle Shockey
2017-11-16 22:25:19 -08:00
parent d28bf86129
commit 0ef0613020
2 changed files with 2 additions and 8 deletions

View File

@@ -58,12 +58,6 @@ export default class Response extends React.Component {
onContentTypeChange: () => {} onContentTypeChange: () => {}
}; };
shouldComponentUpdate(nextProps) {
return this.props.code !== nextProps.code
|| this.props.response !== nextProps.response
|| this.props.className !== nextProps.className
}
_onContentTypeChange = (value) => { _onContentTypeChange = (value) => {
const { onContentTypeChange, controlsAcceptHeader } = this.props const { onContentTypeChange, controlsAcceptHeader } = this.props
this.setState({ responseContentType: value }) this.setState({ responseContentType: value })

View File

@@ -38,7 +38,7 @@ export default class Responses extends React.Component {
return render return render
} }
onChangeProducesWrapper = ( val ) => this.props.specActions.changeProducesValue(this.props.path, this.props.method, val) onChangeProducesWrapper = ( val ) => this.props.specActions.changeProducesValue([this.props.path, this.props.method], val)
onResponseContentTypeChange = ({ controlsAcceptHeader, value }) => { onResponseContentTypeChange = ({ controlsAcceptHeader, value }) => {
const { oas3Actions, path, method } = this.props const { oas3Actions, path, method } = this.props