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:
Maria Alexandra 2021-09-13 16:47:01 +02:00 committed by GitHub
parent 9dfd469afc
commit 04e7736cba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -738,9 +738,11 @@ export class DashboardModel {
panelBelowIndex = insertPos + rowPanels.length;
}
// Update gridPos for panels below
for (let i = panelBelowIndex; i < this.panels.length; i++) {
this.panels[i].gridPos.y += yPos;
// 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++) {
this.panels[i].gridPos.y += yPos;
}
}
}
}