NgbTypeahead instance is only defined when model has authority

This commit is contained in:
William Welling
2024-01-26 15:50:41 -06:00
parent 5b9a98adc1
commit 018d44c616

View File

@@ -151,7 +151,7 @@ export class DsDynamicTagComponent extends DsDynamicVocabularyComponent implemen
* @param event The value to emit.
*/
onBlur(event: Event) {
if (isNotEmpty(this.currentValue) && !this.instance.isPopupOpen()) {
if (isNotEmpty(this.currentValue) && (!this.model.hasAuthority || !this.instance.isPopupOpen())) {
this.addTagsToChips();
}
this.blur.emit(event);