Skip to content

Commit 61ded72

Browse files
authored
Merge pull request DSpace#2616 from DSpace/backport-2574-to-dspace-7_x
[Port dspace-7_x] Support type-bind of elements based on repeatable list type-bound element (CHECKBOX_GROUP)
2 parents 34b91a7 + bc21085 commit 61ded72

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ export class DsDynamicTypeBindRelationService {
183183
const initValue = (hasNoValue(relatedModel.value) || typeof relatedModel.value === 'string') ? relatedModel.value :
184184
(Array.isArray(relatedModel.value) ? relatedModel.value : relatedModel.value.value);
185185

186-
const valueChanges = relatedModel.valueChanges.pipe(
186+
const updateSubject = (relatedModel.type === 'CHECKBOX_GROUP' ? relatedModel.valueUpdates : relatedModel.valueChanges);
187+
const valueChanges = updateSubject.pipe(
187188
startWith(initValue)
188189
);
189190

0 commit comments

Comments
 (0)