Skip to content

Commit

Permalink
108055: add user input to tag list
Browse files Browse the repository at this point in the history
(cherry picked from commit aac58e6)
  • Loading branch information
Jens Vannerum authored and github-actions[bot] committed Nov 9, 2023
1 parent a758848 commit e815b1d
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ export class DsDynamicTagComponent extends DsDynamicVocabularyComponent implemen
}
}),
map((list: PaginatedList<VocabularyEntry>) => list.page),
// Add user input as last item of the list
map((list: VocabularyEntry[]) => {
if (list && list.length > 0) {
if (isNotEmpty(this.currentValue)) {
let vocEntry = new VocabularyEntry();
vocEntry.display = this.currentValue;
vocEntry.value = this.currentValue;
list.push(vocEntry);
}
}
return list;
}),
tap(() => this.changeSearchingStatus(false)),
merge(this.hideSearchingWhenUnsubscribed));

Expand Down

0 comments on commit e815b1d

Please sign in to comment.