From fc26ffb78f05209e79d50b4775b299bafd121a7e Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Tue, 27 Jun 2017 21:40:00 -0700 Subject: [PATCH] Hide Callbacks operation tab if there are no callbacks --- src/core/plugins/oas3/wrap-components/parameters.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core/plugins/oas3/wrap-components/parameters.jsx b/src/core/plugins/oas3/wrap-components/parameters.jsx index 50b33b56..46831422 100644 --- a/src/core/plugins/oas3/wrap-components/parameters.jsx +++ b/src/core/plugins/oas3/wrap-components/parameters.jsx @@ -107,9 +107,13 @@ class Parameters extends Component {
this.toggleTab("parameters")} className={`tab-item ${this.state.parametersVisible && "active"}`}>

Parameters

-
this.toggleTab("callbacks")} className={`tab-item ${this.state.callbackVisible && "active"}`}> -

Callbacks

-
+ { operation.get("callbacks") ? + ( +
this.toggleTab("callbacks")} className={`tab-item ${this.state.callbackVisible && "active"}`}> +

Callbacks

+
+ ) : null + } { allowTryItOut ? (