diff --git a/ui-ngx/src/app/shared/components/slack-conversation-autocomplete.component.ts b/ui-ngx/src/app/shared/components/slack-conversation-autocomplete.component.ts index 001631360a..31c61511a2 100644 --- a/ui-ngx/src/app/shared/components/slack-conversation-autocomplete.component.ts +++ b/ui-ngx/src/app/shared/components/slack-conversation-autocomplete.component.ts @@ -134,6 +134,7 @@ export class SlackConversationAutocompleteComponent implements ControlValueAcces if (!change.firstChange && change.currentValue !== change.previousValue) { if (propName === 'slackChanelType' || propName === 'token') { this.clearSlackCache(); + this.dirty = true; this.conversationSlackFormGroup.get('conversation').patchValue(''); } } @@ -167,8 +168,8 @@ export class SlackConversationAutocompleteComponent implements ControlValueAcces onFocus() { if (this.dirty) { - this.conversationSlackFormGroup.get('conversation').updateValueAndValidity({onlySelf: true, emitEvent: true}); this.dirty = false; + this.conversationSlackFormGroup.get('conversation').updateValueAndValidity({onlySelf: true, emitEvent: true}); } } @@ -184,6 +185,9 @@ export class SlackConversationAutocompleteComponent implements ControlValueAcces } private fetchSlackConversation(searchText?: string): Observable> { + if (this.dirty) { + return of([]); + } if (this.slackSearchText !== searchText || this.latestSearchConversetionResult === null) { this.slackSearchText = searchText; const slackConversationFilter = this.createSlackConversationFilter(this.slackSearchText); diff --git a/ui-ngx/src/app/shared/models/notification.models.ts b/ui-ngx/src/app/shared/models/notification.models.ts index c77373922e..0969af78d4 100644 --- a/ui-ngx/src/app/shared/models/notification.models.ts +++ b/ui-ngx/src/app/shared/models/notification.models.ts @@ -539,7 +539,7 @@ export const NotificationTemplateTypeTranslateMap = new Map