File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
x-pack/legacy/plugins/infra/public/pages/logs/analysis/sections/anomalies Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -190,9 +190,7 @@ const AnnotationTooltip: React.FunctionComponent<{ details: string }> = ({ detai
190190 { parsedDetails . anomalyScoresByPartition . map (
191191 ( { partitionId, maximumAnomalyScore } , index ) => {
192192 return (
193- < li
194- key = { `${ index } -overall-anomaly-chart-${ partitionId } -partition-score-${ maximumAnomalyScore } ` }
195- >
193+ < li key = { `overall-anomaly-chart-${ partitionId } ` } >
196194 < span >
197195 { `${ partitionId } : ` }
198196 < b > { maximumAnomalyScore } </ b >
Original file line number Diff line number Diff line change @@ -100,11 +100,8 @@ export const AnomaliesTable: React.FunctionComponent<{
100100 const toggleExpandedItems = useCallback (
101101 item => {
102102 if ( itemIdToExpandedRowMap [ item . id ] ) {
103- const newItemIdToExpandedRowMap = {
104- ...itemIdToExpandedRowMap ,
105- } ;
106- delete newItemIdToExpandedRowMap [ item . id ] ;
107- setItemIdToExpandedRowMap ( newItemIdToExpandedRowMap ) ;
103+ const { [ item . id ] : toggledItem , ...remainingExpandedRowMap } = itemIdToExpandedRowMap ;
104+ setItemIdToExpandedRowMap ( remainingExpandedRowMap ) ;
108105 } else {
109106 const newItemIdToExpandedRowMap = {
110107 ...itemIdToExpandedRowMap ,
You can’t perform that action at this time.
0 commit comments