From 68fb4da24acd94e62bad945ca198e0677605411f Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Wed, 1 Feb 2023 11:30:55 +0000 Subject: [PATCH] [v9.4.x] Alerting: Show 'start typing' message in evaluation group folder in case of empty options. (#62665) Alerting: Show 'start typing' message in evaluation group folder in case of empty options. (#62611) Show start typing message in evaluation group folder in case of empty options (cherry picked from commit c0865c863d55286e7c2d6ae25974254a240ccc5b) Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com> --- .../unified/components/rule-editor/FolderAndGroup.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/app/features/alerting/unified/components/rule-editor/FolderAndGroup.tsx b/public/app/features/alerting/unified/components/rule-editor/FolderAndGroup.tsx index d945a7bace8..bb36dad7fb4 100644 --- a/public/app/features/alerting/unified/components/rule-editor/FolderAndGroup.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/FolderAndGroup.tsx @@ -1,11 +1,11 @@ import { css } from '@emotion/css'; import { debounce } from 'lodash'; -import React, { useState, useRef, useEffect, useCallback, useMemo } from 'react'; +import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { useFormContext } from 'react-hook-form'; import { GrafanaTheme2, SelectableValue } from '@grafana/data'; import { Stack } from '@grafana/experimental'; -import { AsyncSelect, Field, InputControl, Label, useStyles2, LoadingPlaceholder } from '@grafana/ui'; +import { AsyncSelect, Field, InputControl, Label, LoadingPlaceholder, useStyles2 } from '@grafana/ui'; import { FolderPickerFilter } from 'app/core/components/Select/FolderPicker'; import { contextSrv } from 'app/core/core'; import { DashboardSearchHit } from 'app/features/search/types'; @@ -235,6 +235,7 @@ export function FolderAndGroup({ initialFolder }: FolderAndGroupProps) { value={selectedGroup} allowCustomValue formatCreateLabel={(_) => '+ Add new '} + noOptionsMessage="Start typing to create evaluation group" /> ) }