mirror of
https://github.com/apache/superset.git
synced 2026-05-07 08:54:23 +00:00
ESLint: Re-enable rule no-access-state-in-setstate (#10870)
* Re-enable rule no-access-state-in-setstate * Move accessing event values out of async functions
This commit is contained in:
committed by
GitHub
parent
3d8f757ac8
commit
4835d3b0a2
@@ -333,7 +333,7 @@ export default class AnnotationLayer extends React.PureComponent {
|
||||
annotation.color =
|
||||
annotation.color === AUTOMATIC_COLOR ? null : annotation.color;
|
||||
this.props.addAnnotationLayer(annotation);
|
||||
this.setState({ isNew: false, oldName: this.state.name });
|
||||
this.setState(prevState => ({ isNew: false, oldName: prevState.name }));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user