From 9488ce858510d6b672e6ec3adfb2c115a976d3ef Mon Sep 17 00:00:00 2001 From: GitStart <1501599+gitstart@users.noreply.github.com> Date: Fri, 18 Aug 2023 09:04:57 +0100 Subject: [PATCH] FE: chart metrics name suggestion not updated when text is update (#3329) Co-authored-by: gitstart Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com> Co-authored-by: RubensRafael Co-authored-by: gitstart_bot Co-authored-by: Prashant Shahi --- .../src/lib/newQueryBuilder/getAutocompleteValueAndType.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/lib/newQueryBuilder/getAutocompleteValueAndType.ts b/frontend/src/lib/newQueryBuilder/getAutocompleteValueAndType.ts index bbc7c8fcfe..307d28bc29 100644 --- a/frontend/src/lib/newQueryBuilder/getAutocompleteValueAndType.ts +++ b/frontend/src/lib/newQueryBuilder/getAutocompleteValueAndType.ts @@ -2,8 +2,6 @@ import { autocompleteType } from 'constants/queryBuilder'; import { SPLIT_FIRST_UNDERSCORE } from 'constants/regExp'; export const getAutocompleteValueAndType = (str: string): [string, string] => { - if (str === '') return [str, str]; - const [firstValue, secondValue] = str.split(SPLIT_FIRST_UNDERSCORE); if ( @@ -13,5 +11,5 @@ export const getAutocompleteValueAndType = (str: string): [string, string] => { return [firstValue, secondValue]; } - return ['', firstValue]; + return [str, str]; };