Remove Response update logic; dispatch changeProducesValue correctly
This commit is contained in:
@@ -58,12 +58,6 @@ export default class Response extends React.Component {
|
||||
onContentTypeChange: () => {}
|
||||
};
|
||||
|
||||
shouldComponentUpdate(nextProps) {
|
||||
return this.props.code !== nextProps.code
|
||||
|| this.props.response !== nextProps.response
|
||||
|| this.props.className !== nextProps.className
|
||||
}
|
||||
|
||||
_onContentTypeChange = (value) => {
|
||||
const { onContentTypeChange, controlsAcceptHeader } = this.props
|
||||
this.setState({ responseContentType: value })
|
||||
|
||||
@@ -38,7 +38,7 @@ export default class Responses extends React.Component {
|
||||
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 }) => {
|
||||
const { oas3Actions, path, method } = this.props
|
||||
|
||||
Reference in New Issue
Block a user