Allow dashboard to restore state (either saved state or from backend). Restore old state on edition cancel

This commit is contained in:
Stephen Abello
2026-01-15 11:51:49 +01:00
parent 27c16a782c
commit 5cfe7fa6eb
4 changed files with 85 additions and 99 deletions

View File

@@ -143,11 +143,16 @@ class IboGrid extends HTMLElement {
}
}
}
Serialize() {
ClearGrid() {
this.oGrid.removeAll();
}
Serialize(bIncludeHtml = false) {
const aSlots = this.getSlots();
return aSlots.reduce((aAccumulator, oSlot) => {
aAccumulator[oSlot.oDashlet.sDashletId] = oSlot.Serialize();
aAccumulator[oSlot.oDashlet.sDashletId] = oSlot.Serialize(bIncludeHtml);
return aAccumulator;
}, {});
}