Update cg-dropdown.js

This commit is contained in:
MaxOvs19 2022-11-14 18:58:35 +03:00 committed by GitHub
parent dafbe807da
commit 22e9b7692c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -217,11 +217,15 @@ export class DropDown {
}
const select = this.#element.querySelector('.cg-select');
const nativSelect = this.#element.querySelector('.nativSelect');
if (value === true) {
this.#element.setAttribute('disabled', true);
nativSelect.setAttribute('disabled', true);
select.classList.add('disabled');
} else {
this.#element.removeAttribute('disabled');
nativSelect.removeAttribute('disabled');
select.classList.remove('disabled');
}
}