Dashboards: Remove default empty string from variable create view (#98922)

* default empty string

* optimize
pull/99905/head
jackyin 5 months ago committed by GitHub
parent e0151528a4
commit 6496705120
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      e2e/dashboards-suite/new-query-variable.spec.ts
  2. 2
      public/app/features/dashboard-scene/settings/variables/VariableEditorForm.tsx

@ -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');
});

@ -113,7 +113,7 @@ export function VariableEditorForm({
{EditorToRender && <EditorToRender variable={variable} onRunQuery={onRunQuery} />}
{isHasVariableOptions && <VariableValuesPreview options={variable.getOptionsForSelect()} />}
{isHasVariableOptions && <VariableValuesPreview options={variable.getOptionsForSelect(false)} />}
<div className={styles.buttonContainer}>
<Stack gap={2}>

Loading…
Cancel
Save