Skip to content

Commit 09f90ec

Browse files
authoredMar 18, 2025··
fix: Dedupe keys in tags list (#87294)
We were getting back string and numeric tags with the same tag key value, keys are inferred using the value if not explicitly provided. When the same value appears in string and numeric tags, it causes rendering issues. Updated the key to take in field type to make the render keys unique. Before ![Screenshot 2025-03-18 at 12 46 01 PM](https://github.com/user-attachments/assets/e43ff7ba-3a57-48f0-ae0f-e11b052e5fc7) After ![Screenshot 2025-03-18 at 12 48 06 PM](https://github.com/user-attachments/assets/4e16234d-17a8-4d71-82c9-a28037d97158)
1 parent cad8758 commit 09f90ec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎static/app/views/explore/tables/columnEditorModal.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export function ColumnEditorModal({
5353
value: column,
5454
textValue: column,
5555
trailingItems: <TypeBadge kind={classifyTagKey(column)} />,
56+
key: `${column}-${classifyTagKey(column)}`,
5657
};
5758
}),
5859
...Object.values(stringTags).map(tag => {
@@ -61,6 +62,7 @@ export function ColumnEditorModal({
6162
value: tag.key,
6263
textValue: tag.name,
6364
trailingItems: <TypeBadge kind={FieldKind.TAG} />,
65+
key: `${tag.key}-${FieldKind.TAG}`,
6466
};
6567
}),
6668
...Object.values(numberTags).map(tag => {
@@ -69,6 +71,7 @@ export function ColumnEditorModal({
6971
value: tag.key,
7072
textValue: tag.name,
7173
trailingItems: <TypeBadge kind={FieldKind.MEASUREMENT} />,
74+
key: `${tag.key}-${FieldKind.MEASUREMENT}`,
7275
};
7376
}),
7477
];

0 commit comments

Comments
 (0)
Please sign in to comment.