From 64967051206263788d05a09a08ac06bb1235e2b4 Mon Sep 17 00:00:00 2001 From: jackyin Date: Mon, 3 Feb 2025 21:55:41 +0800 Subject: [PATCH] Dashboards: Remove default empty string from variable create view (#98922) * default empty string * optimize --- e2e/dashboards-suite/new-query-variable.spec.ts | 2 +- .../dashboard-scene/settings/variables/VariableEditorForm.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/dashboards-suite/new-query-variable.spec.ts b/e2e/dashboards-suite/new-query-variable.spec.ts index d6ead2937c4..daed9222d17 100644 --- a/e2e/dashboards-suite/new-query-variable.spec.ts +++ b/e2e/dashboards-suite/new-query-variable.spec.ts @@ -72,7 +72,7 @@ describe('Variables - Query - Add variable', () => { cy.get('input[type="checkbox"]').should('not.be.checked'); }); - e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().should('not.have.text'); + e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().should('not.exist'); e2e.pages.Dashboard.Settings.Variables.Edit.General.selectionOptionsCustomAllInput().should('not.exist'); }); diff --git a/public/app/features/dashboard-scene/settings/variables/VariableEditorForm.tsx b/public/app/features/dashboard-scene/settings/variables/VariableEditorForm.tsx index 4e2e2777825..d3285be7584 100644 --- a/public/app/features/dashboard-scene/settings/variables/VariableEditorForm.tsx +++ b/public/app/features/dashboard-scene/settings/variables/VariableEditorForm.tsx @@ -113,7 +113,7 @@ export function VariableEditorForm({ {EditorToRender && } - {isHasVariableOptions && } + {isHasVariableOptions && }