Opened 9 years ago

Closed 4 years ago

#11037 closed enhancement (wontfix)

AccordionContainer: support dynamic height

Reported by: Fausto Lemos Owned by:
Priority: low Milestone: 1.11
Component: Dijit Version: 1.4.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Hello!

i´m using AccordionContainer and the content of my ContentPanes? that is inside this Accordion are set in a dynamic way. The problem is that Accordion doens´t respect the height of this dynamic content. I saw a hack for this and want to discuss with you guys to see if its possible to put this on a next release:

		_getTargetHeight: function(_2){
				    var cs=dojo.getComputedStyle(_2);
				    var targetHeight = Math.max(this._verticalSpace-dojo._getPadBorderExtents(_2,cs).h,0);
				    if (targetHeight == 0)
				        return "auto";
				    //return _2.style.height.replace("px","");
				    else
				        return targetHeight;    
		}

Change History (6)

comment:1 Changed 9 years ago by bill

Description: modified (diff)
Milestone: tbdfuture
Summary: Accordion Container - Dynamic content "_getTargetHeight()"AccordionContainer: support dynamic height
Type: defectenhancement

This is equivalent to the doLayout=false flag to TabContainer, and also similar to the TitleGroup widget explained on the SitePen? site.

I'm not sure if I want to add such a feature to AccordionContainer itself but I'll leave this ticket open for now, to track the idea.

comment:2 Changed 9 years ago by Fausto Lemos

ok, tks!

comment:3 Changed 9 years ago by bill

FYI, you can use http://docs.dojocampus.org/dojox/widget/TitleGroup to get an accordion with variable height. Might still add it to the base accordion though.

comment:4 Changed 8 years ago by bill

#14778 is a duplicate of this ticket.

comment:5 Changed 7 years ago by bill

Priority: highlow

comment:6 Changed 4 years ago by dylan

Milestone: future1.11
Resolution: wontfix
Status: newclosed

Given the answer of "use dojox/widget/TitleGroup" works (but https://github.com/dojo/dojox/blob/master/widget/TitleGroup.js should be updated for modern best practices at some point), and the lack of activity, I'm closing this out.

Note: See TracTickets for help on using tickets.