Skip to content

Commit 5de8f72

Browse files
committed
disable multiselect input if source select is also disabled
1 parent 3624f6a commit 5de8f72

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

assets-src/js/multiselect-module.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,13 @@ const MultiselectButtons = function (selectEl, params) {
177177
input.style.backgroundRepeat = 'no-repeat';
178178
input.style.backgroundPosition = 'center right 0.625rem';
179179
input.style.backgroundSize = '0.9375rem';
180+
181+
// if selectEl is disabled, disable the input as well
182+
if (selectEl.disabled) {
183+
input.setAttribute('disabled', 'disabled');
184+
}
185+
186+
180187
divComboBox.appendChild(input);
181188

182189
const labelComboBox = document.createElement('label');

0 commit comments

Comments
 (0)