diff --git a/docs/sources/plugins/developing/panels.md b/docs/sources/plugins/developing/panels.md index d679288e2d2..7212e7b4bdf 100644 --- a/docs/sources/plugins/developing/panels.md +++ b/docs/sources/plugins/developing/panels.md @@ -25,8 +25,6 @@ export class MyPanelCtrl extends PanelCtrl { ... ``` -In this case, make sure the template has a single `
...
` root. The plugin loader will modifiy that element adding a scrollbar. - ### Examples diff --git a/public/app/features/panel/panel_directive.ts b/public/app/features/panel/panel_directive.ts index e549ca262d3..3f8c747f28c 100644 --- a/public/app/features/panel/panel_directive.ts +++ b/public/app/features/panel/panel_directive.ts @@ -21,7 +21,9 @@ var panelTemplate = `
- +
+
+
@@ -113,7 +115,7 @@ module.directive('grafanaPanel', function($rootScope, $document, $timeout) { `; let scrollRoot = panelContent; - let scroller = panelContent.find(':first').find(':first'); + let scroller = panelContent.find(':first'); scrollRoot.addClass(scrollRootClass); $(scrollBarHTML).appendTo(scrollRoot);