Re-enable rule no-unused-state (#10871)

This commit is contained in:
Kamil Gabryjelski
2020-09-14 19:31:16 +02:00
committed by GitHub
parent 352e8a1afd
commit 906a629b33
9 changed files with 3 additions and 31 deletions

View File

@@ -50,9 +50,6 @@ const defaultProps = {
export default class ColorSchemeControl extends React.PureComponent {
constructor(props) {
super(props);
this.state = {
scheme: this.props.value,
};
this.onChange = this.onChange.bind(this);
this.renderOption = this.renderOption.bind(this);
}
@@ -60,7 +57,6 @@ export default class ColorSchemeControl extends React.PureComponent {
onChange(option) {
const optionValue = option ? option.value : null;
this.props.onChange(optionValue);
this.setState({ scheme: optionValue });
}
renderOption(key) {

View File

@@ -60,7 +60,6 @@ class DatasourceControl extends React.PureComponent {
this.state = {
showEditDatasourceModal: false,
showChangeDatasourceModal: false,
menuExpanded: false,
};
this.onDatasourceSave = this.onDatasourceSave.bind(this);
this.toggleChangeDatasourceModal = this.toggleChangeDatasourceModal.bind(