Skip to content

Commit

Permalink
fix: mention trigger with OnPush change detection
Browse files Browse the repository at this point in the history
  • Loading branch information
szuperaz committed Jan 15, 2024
1 parent 6ad819d commit 619b3e1
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
AfterViewInit,
ChangeDetectorRef,
Component,
ElementRef,
EventEmitter,
Expand Down Expand Up @@ -126,7 +127,8 @@ export class AutocompleteTextareaComponent
private transliterationService: TransliterationService,
private emojiInputService: EmojiInputService,
private customTemplatesService: CustomTemplatesService,
private themeService: ThemeService
private themeService: ThemeService,
private cdRef: ChangeDetectorRef
) {
this.searchTerm$.pipe(debounceTime(300)).subscribe((searchTerm) => {
if (searchTerm.startsWith(this.mentionTriggerChar)) {
Expand Down Expand Up @@ -293,6 +295,7 @@ export class AutocompleteTextareaComponent
this.slashCommandConfig,
];
this.autocompleteConfig = { ...this.autocompleteConfig };
this.cdRef.detectChanges();
}

private updateMentionedUsersFromText() {
Expand Down

0 comments on commit 619b3e1

Please sign in to comment.