Skip to content

Commit cdc1737

Browse files
timea-solidCopilot
andauthored
Update src/widgets/forms.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 68063c2 commit cdc1737

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/widgets/forms.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -733,11 +733,13 @@ field[ns.ui('Classifier').uri] = function (
733733
checkOptions
734734
)
735735
// Set readonly if not editable
736-
if (selectElement && selectElement.querySelector && selectElement.querySelector('select')) {
737-
const select = selectElement.querySelector('select');
738-
if (select && !kb.updater.editable(dataDoc.uri)) {
739-
select.disabled = true;
740-
select.style = style.textInputStyleUneditable;
736+
if (selectElement && selectElement.querySelectorAll) {
737+
const selects = selectElement.querySelectorAll('select')
738+
if (selects.length && !kb.updater.editable(dataDoc.uri)) {
739+
selects.forEach(select => {
740+
select.readOnly = true
741+
select.style = style.textInputStyleUneditable
742+
})
741743
}
742744
}
743745
selectBox.appendChild(selectElement)

0 commit comments

Comments
 (0)