fix(frontend): Consider checkboxes in table cross references

This commit is contained in:
2026-02-22 18:46:33 +01:00
parent f68e5671b8
commit 619a93d5cf

View File

@@ -19,6 +19,16 @@ export function useTableCrossReferences() {
const sourceTable = findTableElement(columnConfig.sourceTableReference, allFormElements) const sourceTable = findTableElement(columnConfig.sourceTableReference, allFormElements)
if (!sourceTable) { if (!sourceTable) {
// Fallback: CHECKBOX element — return all option labels as dropdown choices
const sourceCheckbox = allFormElements.find(
(el) => el.reference === columnConfig.sourceTableReference && el.type === 'CHECKBOX'
)
if (sourceCheckbox) {
return sourceCheckbox.options
.filter((opt) => opt.value === 'true')
.map((opt) => opt.label)
.filter(Boolean)
}
return [] return []
} }