fix(frontend): Consider checkboxes in table cross references
This commit is contained in:
@@ -19,6 +19,16 @@ export function useTableCrossReferences() {
|
||||
|
||||
const sourceTable = findTableElement(columnConfig.sourceTableReference, allFormElements)
|
||||
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 []
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user