From d16211b7827e70510456aac9336e14610854faba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 20 Mar 2020 11:04:21 +0100 Subject: [PATCH] Azure: Fixed dropdowns not showing current value (#22914) --- public/app/core/components/form_dropdown/form_dropdown.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/core/components/form_dropdown/form_dropdown.ts b/public/app/core/components/form_dropdown/form_dropdown.ts index 1717321aeb1..9f999570024 100644 --- a/public/app/core/components/form_dropdown/form_dropdown.ts +++ b/public/app/core/components/form_dropdown/form_dropdown.ts @@ -1,6 +1,7 @@ import _ from 'lodash'; import coreModule from '../../core_module'; import { ISCEService } from 'angular'; +import { promiseToDigest } from 'app/core/utils/promiseToDigest'; function typeaheadMatcher(this: any, item: string) { let str = this.query; @@ -101,8 +102,7 @@ export class FormDropdownCtrl { } getOptionsInternal(query: string) { - const result = this.getOptions({ $query: query }); - return Promise.resolve(result); + return promiseToDigest(this.$scope)(Promise.resolve(this.getOptions({ $query: query }))); } isPromiseLike(obj: any) {