@@ -25,6 +25,7 @@ export default class Parameters extends Component {
2525 tryItOutEnabled : PropTypes . bool ,
2626 allowTryItOut : PropTypes . bool ,
2727 onTryoutClick : PropTypes . func ,
28+ onResetClick : PropTypes . func ,
2829 onCancelClick : PropTypes . func ,
2930 onChangeKey : PropTypes . array ,
3031 pathMethod : PropTypes . array . isRequired ,
@@ -73,7 +74,7 @@ export default class Parameters extends Component {
7374 } )
7475 }
7576 }
76-
77+
7778 onChangeMediaType = ( { value, pathMethod } ) => {
7879 let { specActions, oas3Selectors, oas3Actions } = this . props
7980 const userHasEditedBody = oas3Selectors . hasUserEditedBody ( ...pathMethod )
@@ -94,6 +95,7 @@ export default class Parameters extends Component {
9495
9596 let {
9697 onTryoutClick,
98+ onResetClick,
9799 parameters,
98100 allowTryItOut,
99101 tryItOutEnabled,
@@ -161,7 +163,7 @@ export default class Parameters extends Component {
161163 enabled = { tryItOutEnabled }
162164 onCancelClick = { this . props . onCancelClick }
163165 onTryoutClick = { onTryoutClick }
164- onResetClick = { ( ) => oas3Actions . setRequestBodyValue ( { value : undefined , pathMethod } ) } />
166+ onResetClick = { ( ) => onResetClick ( pathMethod ) } />
165167 ) : null }
166168 </ div >
167169 { this . state . parametersVisible ? < div className = "parameters-container" >
@@ -220,7 +222,7 @@ export default class Parameters extends Component {
220222 onChange = { ( value ) => {
221223 this . onChangeMediaType ( { value, pathMethod } )
222224 } }
223- className = "body-param-content-type"
225+ className = "body-param-content-type"
224226 ariaLabel = "Request content type" />
225227 </ label >
226228 </ div >
0 commit comments