Skip to content

Commit

Permalink
108055: add user input to tag list
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Vannerum committed Nov 8, 2023
1 parent 0dcf6cb commit aac58e6
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 aac58e6

Please sign in to comment.