diff --git a/src/core/components/auth/api-key-auth.jsx b/src/core/components/auth/api-key-auth.jsx index 5b3527e8c06..deafedc4452 100644 --- a/src/core/components/auth/api-key-auth.jsx +++ b/src/core/components/auth/api-key-auth.jsx @@ -69,7 +69,7 @@ export default class ApiKeyAuth extends React.Component { { value ? ****** - : + : } { diff --git a/src/core/components/auth/auths.jsx b/src/core/components/auth/auths.jsx index 62a9bd61e9d..450f9d51fd8 100644 --- a/src/core/components/auth/auths.jsx +++ b/src/core/components/auth/auths.jsx @@ -17,6 +17,17 @@ export default class Auths extends React.Component { this.state = {} } + componentDidMount() { + var inputs = document.getElementsByClassName("modal-ux-content")[0].getElementsByTagName("input") + for (let i = 0; i < inputs.length; i++) { + const element = inputs[i] + if (element) { + element.focus() + break + } + } + } + onAuthChange =(auth) => { let { name } = auth @@ -66,7 +77,9 @@ export default class Auths extends React.Component { }) let nonOauthDefinitions = definitions.filter( schema => schema.get("type") !== "oauth2") - let oauthDefinitions = definitions.filter( schema => schema.get("type") === "oauth2") + let oauthDefinitions = definitions.filter(schema => schema.get("type") === "oauth2") + + return (
diff --git a/src/core/components/auth/basic-auth.jsx b/src/core/components/auth/basic-auth.jsx index 26cd5c7f2c7..ef9d57eaa3d 100644 --- a/src/core/components/auth/basic-auth.jsx +++ b/src/core/components/auth/basic-auth.jsx @@ -66,7 +66,7 @@ export default class BasicAuth extends React.Component { { username ? { username } - : + : } diff --git a/src/core/components/auth/oauth2.jsx b/src/core/components/auth/oauth2.jsx index 9afa70b4940..f55381c22f4 100644 --- a/src/core/components/auth/oauth2.jsx +++ b/src/core/components/auth/oauth2.jsx @@ -163,7 +163,7 @@ export default class Oauth2 extends React.Component { { isAuthorized ? { this.state.username } : - + } diff --git a/src/core/plugins/oas3/components/http-auth.jsx b/src/core/plugins/oas3/components/http-auth.jsx index 584de909fdc..2cdc00db590 100644 --- a/src/core/plugins/oas3/components/http-auth.jsx +++ b/src/core/plugins/oas3/components/http-auth.jsx @@ -74,7 +74,7 @@ export default class HttpAuth extends React.Component { { username ? { username } - : + : } @@ -112,7 +112,7 @@ export default class HttpAuth extends React.Component { { value ? ****** - : + : } {