mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
parent
a73663de41
commit
09b036dc93
@ -64,6 +64,14 @@ export class DataSourceSettingsPage extends PureComponent<Props, State> {
|
||||
await loadDataSource(pageId);
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps: Props) {
|
||||
const { dataSource } = this.props;
|
||||
|
||||
if (prevProps.dataSource !== dataSource) {
|
||||
this.setState({ dataSource });
|
||||
}
|
||||
}
|
||||
|
||||
onSubmit = async (evt: React.FormEvent<HTMLFormElement>) => {
|
||||
evt.preventDefault();
|
||||
|
||||
@ -95,9 +103,7 @@ export class DataSourceSettingsPage extends PureComponent<Props, State> {
|
||||
};
|
||||
|
||||
onModelChange = (dataSource: DataSourceSettings) => {
|
||||
this.setState({
|
||||
dataSource: dataSource,
|
||||
});
|
||||
this.setState({ dataSource });
|
||||
};
|
||||
|
||||
isReadOnly() {
|
||||
|
Loading…
Reference in New Issue
Block a user