From 74201b1a21ee39e6e27946214899898e556e02e5 Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 7 Mar 2023 16:16:01 -0700 Subject: [PATCH] Home WIP: Fix changing portlet width would not stick for some types --- api/js/etemplate/Et2Portlet/Et2Portlet.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/api/js/etemplate/Et2Portlet/Et2Portlet.ts b/api/js/etemplate/Et2Portlet/Et2Portlet.ts index 3d1bb9c092..6c9593583a 100644 --- a/api/js/etemplate/Et2Portlet/Et2Portlet.ts +++ b/api/js/etemplate/Et2Portlet/Et2Portlet.ts @@ -181,7 +181,21 @@ export class Et2Portlet extends Et2Widget(SlCard) */ transformAttributes(attrs) { + // Pull out width - super will handle it wrong then remove it + let width + if(typeof attrs.width != "undefined") + { + width = attrs.width; + delete attrs.width; + } + super.transformAttributes(attrs); + + // If width was provided, put it back + if(typeof width != "undefined") + { + attrs.width = width; + } let data = this.getArrayMgr("content").data.find(e => e.id && e.id == this.id) || {}; this.settings = typeof attrs.settings == "string" ? data.value || data.settings || {} : attrs.settings;