diff --git a/.gitignore b/.gitignore index 053ceecf64f..1d598a8d73f 100644 --- a/.gitignore +++ b/.gitignore @@ -61,6 +61,7 @@ public/css/*.min.css *.sublime-workspace *.swp .idea/ +.fleet/ *.iml *.tmp .DS_Store diff --git a/public/app/core/components/Select/FolderPicker.tsx b/public/app/core/components/Select/FolderPicker.tsx index 27843c3283a..bd428af9c1f 100644 --- a/public/app/core/components/Select/FolderPicker.tsx +++ b/public/app/core/components/Select/FolderPicker.tsx @@ -193,9 +193,8 @@ export function FolderPicker(props: Props) { }, [folder]); const onFolderChange = useCallback( - (newFolder: SelectableValue, actionMeta: ActionMeta) => { - const value = newFolder.value; - if (value === VALUE_FOR_ADD) { + (newFolder: SelectableValue | null | undefined, actionMeta: ActionMeta) => { + if (newFolder?.value === VALUE_FOR_ADD) { setFolder({ id: VALUE_FOR_ADD, title: inputValue, diff --git a/public/app/plugins/panel/alertlist/module.tsx b/public/app/plugins/panel/alertlist/module.tsx index 84d8cbb36e8..f24992a25a7 100644 --- a/public/app/plugins/panel/alertlist/module.tsx +++ b/public/app/plugins/panel/alertlist/module.tsx @@ -246,7 +246,7 @@ const unifiedAlertList = new PanelPlugin(UnifiedAlertLi .addCustomEditor({ path: 'folder', name: 'Folder', - description: 'Filter for alerts in the selected folder', + description: 'Filter for alerts in the selected folder (only for Grafana alerts)', id: 'folder', defaultValue: null, editor: function RenderFolderPicker(props) { @@ -279,7 +279,7 @@ const unifiedAlertList = new PanelPlugin(UnifiedAlertLi noDefault current={props.value} onChange={(ds) => props.onChange(ds.name)} - onClear={() => props.onChange('')} + onClear={() => props.onChange(null)} /> ); },