diff --git a/src/components/editor/InterfaceSummary.jsx b/src/components/editor/InterfaceSummary.jsx index 3c3cec5..1fedcc1 100644 --- a/src/components/editor/InterfaceSummary.jsx +++ b/src/components/editor/InterfaceSummary.jsx @@ -34,12 +34,13 @@ class InterfaceSummary extends Component { super(props) this.state = { bodyOption: BODY_OPTION.FORM_DATA, - requestParamsType: props.method === 'POST' ? REQUEST_PARAMS_TYPE.BODY_PARAMS : REQUEST_PARAMS_TYPE.QUERY_PARAMS + requestParamsType: props.itf.method === 'POST' ? REQUEST_PARAMS_TYPE.BODY_PARAMS : REQUEST_PARAMS_TYPE.QUERY_PARAMS } this.changeMethod = this.changeMethod.bind(this) this.changeHandler = this.changeHandler.bind(this) this.switchBodyOptions = this.switchBodyOption.bind(this) this.switchRequestParamsType = this.switchRequestParamsType.bind(this) + this.state.requestParamsType === REQUEST_PARAMS_TYPE.BODY_PARAMS && props.stateChangeHandler(this.state) } static contextTypes = { store: PropTypes.object.isRequired,