Scenes: Fix panel repeats (#83707)

This commit is contained in:
kay delaney
2024-03-04 13:01:17 +00:00
committed by GitHub
parent 82a88cc83f
commit ad28e3cc77
2 changed files with 7 additions and 3 deletions

View File

@@ -138,7 +138,7 @@ export class PanelEditor extends SceneObjectBase<PanelEditorState> {
width: repeatDirection === 'h' ? 24 : gridItem.state.width,
height: gridItem.state.height,
itemHeight: gridItem.state.height,
source: panelManager.state.panel.clone(),
source: panelManager.getPanelCloneWithData(),
variableName: panelManager.state.repeat!,
repeatedPanels: [],
repeatDirection: panelManager.state.repeatDirection,
@@ -157,7 +157,7 @@ export class PanelEditor extends SceneObjectBase<PanelEditorState> {
}
const panelManager = this.state.vizManager;
const panelClone = panelManager.state.panel.clone();
const panelClone = panelManager.getPanelCloneWithData();
const gridItem = new SceneGridItem({
key: panelRepeater.state.key,
x: panelRepeater.state.x,
@@ -189,7 +189,7 @@ export class PanelEditor extends SceneObjectBase<PanelEditorState> {
}
panelRepeater.setState({
source: panelManager.state.panel.clone(),
source: panelManager.getPanelCloneWithData(),
repeatDirection: panelManager.state.repeatDirection,
variableName: panelManager.state.repeat,
maxPerRow: panelManager.state.maxPerRow,