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
This commit is contained in:
Sonia Aguilar 2023-02-01 12:20:57 +01:00 committed by GitHub
parent ec74e05fc5
commit c0865c863d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"
/>
)
}