03-09-2025 08:10 PM
After an update to 12.6.2, I'm finding that nearly all my custom gadgets are given default heights no matter what the XML requests in the ModulePrefs. One solution is to move declarative config into the init method of the gadget and request the value in
gadgets.window.adjustHeight( <put XML height here> )
Is this the new standard and the XML file is becoming obsolete?
Thanks,
Chris
Solved! Go to Solution.
03-10-2025 04:26 AM
Is it possible you're running into a scenario like what is mentioned in this defect, like in the ES mentioned impacting some gadgets?
https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwk70259
03-10-2025 04:26 AM
Is it possible you're running into a scenario like what is mentioned in this defect, like in the ES mentioned impacting some gadgets?
https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwk70259
03-12-2025 07:09 AM - edited 03-12-2025 07:10 AM
Bill,
I think that's exactly the root cause. My quick-n-dirty fix was to move the height tag value from ModulePrefs in gadget.xml into the gadget's actual code and then add it to the options in my framework that handles a lot of the boilerplate stuff. In its startup code, I added these lines:
this.gadgetContainer = $(`#gadgets-gadget-content-${this.gadgetid}`).parents('.react-grid-item').eq(1);
if (opts.notitle && opts.notitle == true) {
this.titlebar.remove();
if( opts.height ) {
opts.height -= 28;
}
}
setTimeout( () => {
gadgets.window.adjustHeight(opts.height);
this.gadgetContainer.css('height', opts.height+'px');
}, 100);
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide