From 87027b0f775921aca0ee5b47f0f45c6564f47ac8 Mon Sep 17 00:00:00 2001 From: Denis Doria Date: Sat, 18 Mar 2017 15:23:40 +0100 Subject: [PATCH] Do not collapse if there is only 1-3 queries #7836 (#7878) Also has the side effect of new panels having not collapsed queries when being created --- public/app/features/panel/query_editor_row.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/app/features/panel/query_editor_row.ts b/public/app/features/panel/query_editor_row.ts index 76bdd6d8539..8249d84774f 100644 --- a/public/app/features/panel/query_editor_row.ts +++ b/public/app/features/panel/query_editor_row.ts @@ -29,6 +29,10 @@ export class QueryRowCtrl { delete this.target.isNew; this.toggleCollapse(false); } + + if (this.panel.targets.length < 4) { + this.collapsed = false; + } } toggleHideQuery() {