From 0a26cbf36c7c35367387f1291c26d7ba71ee452a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Jamr=C3=B3z?= Date: Mon, 9 Aug 2021 14:48:09 +0200 Subject: [PATCH] Handle undefined values provided for autocomplete --- .../plugins/datasource/graphite/components/TagsSection.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/datasource/graphite/components/TagsSection.tsx b/public/app/plugins/datasource/graphite/components/TagsSection.tsx index 247594f9d58..2a59005268d 100644 --- a/public/app/plugins/datasource/graphite/components/TagsSection.tsx +++ b/public/app/plugins/datasource/graphite/components/TagsSection.tsx @@ -33,8 +33,8 @@ export function TagsSection({ dispatch, tags, state, addTagSegments }: Props) { // Options are reloaded while user is typing with backend taking care of auto-complete (auto-complete cannot be // implemented in front-end because backend returns only limited number of entries) const getTagsAsSegmentsOptions = useCallback( - (inputValue: string) => { - return getTagsAsSegmentsSelectables(state, inputValue); + (inputValue?: string) => { + return getTagsAsSegmentsSelectables(state, inputValue || ''); }, [state] );