Skip to content

Commit

Permalink
Merge pull request #2616 from DSpace/backport-2574-to-dspace-7_x
Browse files Browse the repository at this point in the history
[Port dspace-7_x] Support type-bind of elements based on repeatable list type-bound element (CHECKBOX_GROUP)
  • Loading branch information
tdonohue authored Nov 10, 2023
2 parents 34b91a7 + bc21085 commit 61ded72
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ export class DsDynamicTypeBindRelationService {
const initValue = (hasNoValue(relatedModel.value) || typeof relatedModel.value === 'string') ? relatedModel.value :
(Array.isArray(relatedModel.value) ? relatedModel.value : relatedModel.value.value);

const valueChanges = relatedModel.valueChanges.pipe(
const updateSubject = (relatedModel.type === 'CHECKBOX_GROUP' ? relatedModel.valueUpdates : relatedModel.valueChanges);
const valueChanges = updateSubject.pipe(
startWith(initValue)
);

Expand Down

0 comments on commit 61ded72

Please sign in to comment.