Minor fix scrollpos when duplicating

This commit is contained in:
Torkel Ödegaard 2019-01-17 15:11:38 +01:00
parent a6683dd90e
commit 3cb73e7948

View File

@ -96,7 +96,7 @@ export class QueriesTab extends PureComponent<Props, State> {
onAddQuery = (query?: Partial<DataQuery>) => {
this.props.panel.addQuery(query);
this.forceUpdate();
this.setState({ scrollTop: this.state.scrollTop + 100000 });
};
onAddQueryClick = () => {
@ -105,8 +105,7 @@ export class QueriesTab extends PureComponent<Props, State> {
return;
}
this.props.panel.addQuery();
this.setState({ scrollTop: this.state.scrollTop + 100000 });
this.onAddQuery();
};
onRemoveQuery = (query: DataQuery) => {