mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-28 04:10:44 -04:00
remove readonly attr once element is ready for input (#31502)
This commit is contained in:
parent
b5b4a95280
commit
04295060d1
1 changed files with 7 additions and 3 deletions
|
|
@ -165,9 +165,13 @@ export default class SwaggerUiComponent extends Component {
|
|||
}
|
||||
|
||||
updateDisabledFields() {
|
||||
document.querySelectorAll('.parameters :disabled').forEach((el) => {
|
||||
el.removeAttribute('disabled');
|
||||
el.setAttribute('readonly', true);
|
||||
document.querySelectorAll('.parameters').forEach((el) => {
|
||||
if (!el.disabled) {
|
||||
el.removeAttribute('readonly');
|
||||
} else {
|
||||
el.removeAttribute('disabled');
|
||||
el.setAttribute('readonly', true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue