Home: Immediately apply property changes to portlet

Server can override if needed, but this is a little more responsive and fixes some non webComponent portlets (eg: single entry) still needing a reload before they can stay up to date
This commit is contained in:
nathan 2023-03-16 11:48:50 -06:00
parent ae265c9b52
commit 7c229e1df3

View File

@ -493,6 +493,15 @@ export class Et2Portlet extends Et2Widget(SlCard)
return Promise.resolve();
}
// We can set some things immediately, server will overwrite if it doesn't like them
this.portletProperties.forEach(p =>
{
if(typeof settings[p.name] != "undefined")
{
this[p.name] = settings[p.name];
}
})
// Save settings - server might reply with new content if the portlet needs an update,
// but ideally it doesn't
this.classList.add("loading");