mirror of
https://github.com/grafana/grafana.git
synced 2025-09-23 18:52:33 +08:00
Variables: Fix not updating inside a Panel when the preceding Row uses "Repeat For" (#38935)
Added a condition to the `repeatRow` function to only update GridPos if we actually rendered more than 1 repeated row.
This commit is contained in:
@ -738,12 +738,14 @@ export class DashboardModel {
|
|||||||
panelBelowIndex = insertPos + rowPanels.length;
|
panelBelowIndex = insertPos + rowPanels.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update gridPos for panels below
|
// Update gridPos for panels below if we inserted more than 1 repeated row panel
|
||||||
|
if (selectedOptions.length > 1) {
|
||||||
for (let i = panelBelowIndex; i < this.panels.length; i++) {
|
for (let i = panelBelowIndex; i < this.panels.length; i++) {
|
||||||
this.panels[i].gridPos.y += yPos;
|
this.panels[i].gridPos.y += yPos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
updateRepeatedPanelIds(panel: PanelModel, repeatedByRow?: boolean) {
|
updateRepeatedPanelIds(panel: PanelModel, repeatedByRow?: boolean) {
|
||||||
panel.repeatPanelId = panel.id;
|
panel.repeatPanelId = panel.id;
|
||||||
|
Reference in New Issue
Block a user