FE: chart metrics name suggestion not updated when text is update (#3329)

Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: gitstart_bot <gitstart_bot@users.noreply.github.com>
Co-authored-by: Prashant Shahi <prashant@signoz.io>
This commit is contained in:
GitStart 2023-08-18 09:04:57 +01:00 committed by GitHub
parent 458cff32fd
commit 9488ce8585
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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];
};