소스 검색

fix(): let binding cycle complete before adding panel to dom

Torkel Ödegaard 9 년 전
부모
커밋
00827ce921
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      public/app/core/directives/plugin_component.ts

+ 5 - 2
public/app/core/directives/plugin_component.ts

@@ -206,9 +206,12 @@ function pluginDirectiveLoader($compile, datasourceSrv, $rootScope, $q, $http, $
     });
 
     $compile(child)(scope);
-
     elem.empty();
-    elem.append(child);
+
+    // let a binding digest cycle complete before adding to dom
+    setTimeout(function() {
+      elem.append(child);
+    });
   }
 
   function registerPluginComponent(scope, elem, attrs, componentInfo) {