mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-26 03:04:27 +08:00
fix: [SIG-570]: handle case where - being present in the key (#4735)
This commit is contained in:
parent
9e557a0ebe
commit
f34a49e19c
@ -74,7 +74,11 @@ export const useTag = (
|
|||||||
const handleAddTag = useCallback(
|
const handleAddTag = useCallback(
|
||||||
(value: string): void => {
|
(value: string): void => {
|
||||||
const { tagKey } = getTagToken(value);
|
const { tagKey } = getTagToken(value);
|
||||||
const [key, id] = tagKey.split('-');
|
const parts = tagKey.split('-');
|
||||||
|
|
||||||
|
// this is done to ensure that `hello-world` also gets converted to `body CONTAINS hello-world`
|
||||||
|
const id = parts[parts.length - 1];
|
||||||
|
const key = parts.slice(0, -1).join('-');
|
||||||
|
|
||||||
if (id === 'custom') {
|
if (id === 'custom') {
|
||||||
const customValue = whereClauseConfig
|
const customValue = whereClauseConfig
|
||||||
|
Loading…
x
Reference in New Issue
Block a user