mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
108055: add user input to tag list
(cherry picked from commit aac58e612d
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
a758848146
commit
e815b1d938
@@ -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));
|
||||
|
||||
|
Reference in New Issue
Block a user