mirror of https://github.com/grafana/grafana.git
DashboardEditPane: Get original panel id for repeated panel edit pane (#103877)
get original panel id for repeated panel edit pane
This commit is contained in:
parent
9f9c4b3da3
commit
ae867469a5
|
|
@ -17,7 +17,7 @@ import {
|
||||||
} from '@grafana/ui';
|
} from '@grafana/ui';
|
||||||
import { t, Trans } from 'app/core/internationalization';
|
import { t, Trans } from 'app/core/internationalization';
|
||||||
|
|
||||||
import { isInCloneChain } from '../utils/clone';
|
import { containsCloneKey, getOriginalKey, isInCloneChain } from '../utils/clone';
|
||||||
import { getDashboardSceneFor } from '../utils/utils';
|
import { getDashboardSceneFor } from '../utils/utils';
|
||||||
|
|
||||||
import { DashboardOutline } from './DashboardOutline';
|
import { DashboardOutline } from './DashboardOutline';
|
||||||
|
|
@ -101,7 +101,9 @@ export class DashboardEditPane extends SceneObjectBase<DashboardEditPaneState> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const obj = sceneGraph.findByKey(this, element.id);
|
const elementId = containsCloneKey(element.id) ? getOriginalKey(element.id) : element.id;
|
||||||
|
|
||||||
|
const obj = sceneGraph.findByKey(this, elementId);
|
||||||
if (obj) {
|
if (obj) {
|
||||||
this.selectObject(obj, element.id, options);
|
this.selectObject(obj, element.id, options);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue