Fix styles in fn disabled
This commit is contained in:
parent
3a031a864e
commit
556f05916d
@ -84,10 +84,13 @@ export class DropDown {
|
||||
return;
|
||||
}
|
||||
|
||||
const select = this.#element.querySelector('.cg-select');
|
||||
if (value === true) {
|
||||
this.#element.setAttribute('disabled', true);
|
||||
select.classList.add('disabled');
|
||||
} else {
|
||||
this.#element.removeAttribute('disabled');
|
||||
select.classList.remove('disabled');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,11 +4,7 @@ const dropdown = new DropDown({
|
||||
selector: '.cg-dropdown_one',
|
||||
placeholder: 'Выберите авто',
|
||||
items: ['BMW', 'Opel', 'Mersedes', 'MAN', 'max'],
|
||||
styles: {
|
||||
head: {
|
||||
background: '#4d629f',
|
||||
},
|
||||
},
|
||||
|
||||
multiselect: true,
|
||||
multiselectTag: true,
|
||||
});
|
||||
@ -54,9 +50,10 @@ const dropdown2 = new DropDown({
|
||||
// multiselectTag: true,
|
||||
});
|
||||
|
||||
dropdown2.addItem('LADA');
|
||||
dropdown.disabled(false);
|
||||
|
||||
dropdown2.addItem('LADA');
|
||||
|
||||
//ToDo: paste the desired url;
|
||||
|
||||
const dropdown3 = new DropDown({
|
||||
|
@ -191,3 +191,7 @@ input[type='checkbox'] {
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #4d4d4d;
|
||||
}
|
||||
|
||||
.disabled {
|
||||
background-color: #8f9195 !important;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user