Skip to content

Commit

Permalink
fix(kiali): use prevState callback (#874)
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Coufal <[email protected]>
  • Loading branch information
tumido authored Oct 25, 2023
1 parent 1150451 commit 13a01f7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ export class SparklineChart extends React.Component<Props, State> {
// Was not already hidden => add to set
this.state.hiddenSeries.add(idx);
}
this.setState({ hiddenSeries: new Set(this.state.hiddenSeries) });
this.setState(prevState => ({
hiddenSeries: new Set(prevState.hiddenSeries),
}));
return null;
},
onMouseOver: props => {
Expand Down

0 comments on commit 13a01f7

Please sign in to comment.