Skip to content

Commit a136e14

Browse files
committed
[Security Solution] Fix missing key error (#75576)
1 parent 622bf2d commit a136e14

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

x-pack/plugins/security_solution/public/cases/components/tag_list/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ export const TagList = React.memo(
102102
<EuiBadgeGroup>
103103
{tags.length > 0 &&
104104
!isEditTags &&
105-
tags.map((tag, key) => (
106-
<EuiBadge data-test-subj={`case-tag-${tag}`} color="hollow">
105+
tags.map((tag) => (
106+
<EuiBadge data-test-subj={`case-tag-${tag}`} color="hollow" key={tag}>
107107
{tag}
108108
</EuiBadge>
109109
))}

x-pack/plugins/security_solution/public/cases/components/user_action_tree/helpers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const getTagsLabelTitle = (action: CaseUserActions) => (
5353
<EuiBadgeGroup>
5454
{action.newValue != null &&
5555
action.newValue.split(',').map((tag) => (
56-
<EuiBadge data-test-subj={`ua-tag`} color="default">
56+
<EuiBadge data-test-subj={`ua-tag`} color="default" key={tag}>
5757
{tag}
5858
</EuiBadge>
5959
))}

x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item/exception_entries.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ const ExceptionEntriesComponent = ({
122122
return (
123123
<ValueBadgeGroup gutterSize="xs">
124124
{values.map((value) => {
125-
return <EuiBadge color="#DDD">{value}</EuiBadge>;
125+
return (
126+
<EuiBadge color="#DDD" key={value}>
127+
{value}
128+
</EuiBadge>
129+
);
126130
})}
127131
</ValueBadgeGroup>
128132
);

0 commit comments

Comments
 (0)