[SIEM] Remove redundant props.key access in kpi stat items (#37461) (#37659)

* remove redundant key access

* update snapshot
This commit is contained in:
Angela Chuang 2019-06-01 00:17:28 +08:00 committed by GitHub
parent 1212057345
commit ba6e295e42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 11 deletions

View file

@ -14,9 +14,7 @@ exports[`Stat Items disable charts it renders the default widget 1`] = `
]
}
>
<Styled(EuiFlexItem)
key="stat-items-undefined"
>
<Styled(EuiFlexItem)>
<EuiFlexItem
className="sc-bxivhb bQCHAr"
>
@ -120,9 +118,7 @@ exports[`Stat Items disable charts it renders the default widget 2`] = `
]
}
>
<Styled(EuiFlexItem)
key="stat-items-undefined"
>
<Styled(EuiFlexItem)>
<EuiFlexItem
className="sc-bxivhb bQCHAr"
>
@ -299,9 +295,7 @@ exports[`Stat Items rendering kpis with charts it renders the default widget 1`]
]
}
>
<Styled(EuiFlexItem)
key="stat-items-undefined"
>
<Styled(EuiFlexItem)>
<EuiFlexItem
className="sc-bxivhb bQCHAr"
>

View file

@ -55,7 +55,7 @@ export interface StatItemsProps extends StatItems {
}
export const StatItemsComponent = React.memo<StatItemsProps>(
({ fields, description, key, grow, barChart, areaChart, enableAreaChart, enableBarChart }) => {
({ fields, description, grow, barChart, areaChart, enableAreaChart, enableBarChart }) => {
const isBarChartDataAbailable =
barChart &&
barChart.length &&
@ -65,7 +65,7 @@ export const StatItemsComponent = React.memo<StatItemsProps>(
areaChart.length &&
areaChart.every(item => item.value != null && item.value.length > 0);
return (
<FlexItem key={`stat-items-${key}`} grow={grow}>
<FlexItem grow={grow}>
<EuiPanel>
<EuiTitle size="xxxs">
<h6>{description}</h6>