Make the checkbox id more unique.
If the swagger.json defines more than one oauth2 Security scheme with matching scopes, the id of the scope checkboxes were not unique. As a result the scope for a second security scheme could not be selected. By adding the security scheme name to the id, it becomes more unique.
This commit is contained in:
@@ -182,11 +182,11 @@ export default class Oauth2 extends React.Component {
|
||||
<Row key={ name }>
|
||||
<div className="checkbox">
|
||||
<Input data-value={ name }
|
||||
id={`${name}-checkbox`}
|
||||
id={`${name}-checkbox-${this.state.name}`}
|
||||
disabled={ isAuthorized }
|
||||
type="checkbox"
|
||||
onChange={ this.onScopeChange }/>
|
||||
<label htmlFor={`${name}-checkbox`}>
|
||||
<label htmlFor={`${name}-checkbox-${this.state.name}`}>
|
||||
<span className="item"></span>
|
||||
<div className="text">
|
||||
<p className="name">{name}</p>
|
||||
|
||||
Reference in New Issue
Block a user