mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[ML] Explain Log Rate Spikes: Fix key
attribute for grouped analysis results table (#156038)
Fixes the React dev mode warning "Warning: Each child in a list should have a unique "key" prop. Check the render method of EuiBasicTable" by putting the `key` attribute for a group item on the outer level.
This commit is contained in:
parent
7b947188f2
commit
a3f5a340ce
1 changed files with 3 additions and 7 deletions
|
@ -189,12 +189,8 @@ export const SpikeAnalysisGroupsTable: FC<SpikeAnalysisTableProps> = ({
|
|||
const { fieldName, fieldValue, duplicate } = groupItem;
|
||||
if (valuesBadges.length >= MAX_GROUP_BADGES) break;
|
||||
valuesBadges.push(
|
||||
<>
|
||||
<EuiBadge
|
||||
key={`${fieldName}-id`}
|
||||
data-test-subj="aiopsSpikeAnalysisTableColumnGroupBadge"
|
||||
color="hollow"
|
||||
>
|
||||
<span key={`${fieldName}-id`}>
|
||||
<EuiBadge data-test-subj="aiopsSpikeAnalysisTableColumnGroupBadge" color="hollow">
|
||||
<span>
|
||||
{(duplicate ?? 0) <= 1 ? '* ' : ''}
|
||||
{`${fieldName}: `}
|
||||
|
@ -202,7 +198,7 @@ export const SpikeAnalysisGroupsTable: FC<SpikeAnalysisTableProps> = ({
|
|||
<span style={{ color: visColors[2] }}>{`${fieldValue}`}</span>
|
||||
</EuiBadge>
|
||||
<EuiSpacer size="xs" />
|
||||
</>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue