Skip to content

Commit

Permalink
fix: Deleting and reentering the same char after @ doesn't update the…
Browse files Browse the repository at this point in the history
… mention menu
  • Loading branch information
szuperaz committed Jan 8, 2024
1 parent 4bb53f2 commit b399359
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,12 @@ export class AutocompleteTextareaComponent
private customTemplatesService: CustomTemplatesService,
private themeService: ThemeService
) {
this.searchTerm$
.pipe(debounceTime(300), distinctUntilChanged())
.subscribe((searchTerm) => {
if (searchTerm.startsWith(this.mentionTriggerChar)) {
void this.updateMentionOptions(searchTerm);
}
});
this.searchTerm$.pipe(debounceTime(300)).subscribe((searchTerm) => {
console.log(searchTerm);

Check failure on line 132 in projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts

View workflow job for this annotation

GitHub Actions / workflow (16.x)

Unexpected console statement
if (searchTerm.startsWith(this.mentionTriggerChar)) {
void this.updateMentionOptions(searchTerm);
}
});
this.subscriptions.push(
this.channelService.activeChannel$.subscribe((channel) => {
const commands = channel?.getConfig()?.commands || [];
Expand Down

0 comments on commit b399359

Please sign in to comment.