From 532abe2fc2301ce8d87f5625e94316cbc779fedb Mon Sep 17 00:00:00 2001 From: Roman Khavronenko Date: Mon, 22 Apr 2019 12:11:05 +0100 Subject: [PATCH] Templating: Do not copy hide option (#16696) * Do not override default `hide` value of variables Some variables like `constant` are configured to be hidden by default and this setting must be treated with respect. * make textBox variable visible by default Fixes #16695 --- public/app/features/templating/TextBoxVariable.ts | 2 +- public/app/features/templating/editor_ctrl.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/public/app/features/templating/TextBoxVariable.ts b/public/app/features/templating/TextBoxVariable.ts index 331ff4f95b8..93124adab59 100644 --- a/public/app/features/templating/TextBoxVariable.ts +++ b/public/app/features/templating/TextBoxVariable.ts @@ -9,7 +9,7 @@ export class TextBoxVariable implements Variable { defaults = { type: 'textbox', name: '', - hide: 2, + hide: 0, label: '', query: '', current: {}, diff --git a/public/app/features/templating/editor_ctrl.ts b/public/app/features/templating/editor_ctrl.ts index 6d70be63771..a13e51fe2b5 100644 --- a/public/app/features/templating/editor_ctrl.ts +++ b/public/app/features/templating/editor_ctrl.ts @@ -163,7 +163,6 @@ export class VariableEditorCtrl { type: $scope.current.type, }); $scope.current.name = old.name; - $scope.current.hide = old.hide; $scope.current.label = old.label; const oldIndex = _.indexOf(this.variables, old);