Skip to content

Commit 8a651ef

Browse files
authored
Merge pull request DSpace#2574 from mahnkong/main
Support type-bind of elements based on repeatable list type-bound element (CHECKBOX_GROUP)
2 parents 642d577 + 09aaa46 commit 8a651ef

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)