Results 1 to 2 of 2

Thread: Collapsible Panel (with dynamic: true) Does Not Grow to Fit Expanding Contents

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Jul 2011
    Virginia Beach
    Vote Rating

    Default Collapsible Panel (with dynamic: true) Does Not Grow to Fit Expanding Contents

    Good afternoon -

    When using an collapsible panel, the collapse/expand animation is simply.... GOOFY, without setting the dynamic: true configuration within the Ext.Panel's collapsible configuration. HOWEVER. When dynamic is set to true, then body of the Ext.Panel will not grow as its contents grow (say, for instance, the Ext.Panel houses an Ext.dataview.List of comments which grows in size every time a comment is added).

    Take a look at this Fiddle:

    As-is, dynamic is set to true and the collapse and expand animation for "Section 2" occurs smoothly. Add a comment. Note that the bottom part of your new comment AND the input and submit button get shoved down out of sight. Collapse and then expand "Section 2." All content is now visible.

    Comment out the dynamic: true configuration (line 129) and run the Fiddle again. Notice:
    1. how goofy the expand and collapse animations are; and
    2. how the body of the "Section 2" Ext.Panel grows to account for the increased size of the Ext.dataview.List.

    What can be done to utilize the dynamic: true configuration, but also retain the Ext.Panel's apparently-innate ability to grow its body in accordance with any dynamically-grown content?

    Thank you.

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Sydney, Australia
    Vote Rating


    In doExpandCollapseDynamic, I think you want to change:

    return me.doAnimation(collapsed, Ext.apply({
        scope: me,
        callback: me.afterExpandCollapseAnimation,
        element: targetEl,
        preserveEndState: collapsed,
        from: from,
        to: to
    }, animation), {
        restore: !collapsed
    preserveEndState was true before. Not tested, YMMV etc.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Similar Threads

  1. [FIXED] Collapsible Panel is expanding with a weird animation
    By vegidio in forum Ext:Bugs
    Replies: 5
    Last Post: 11 Oct 2014, 4:20 AM
  2. Replies: 3
    Last Post: 30 Sep 2014, 6:20 AM
  3. [NOREPRO] Collapsible panel not expanding after refresh
    By Kabali in forum Ext:Bugs
    Replies: 1
    Last Post: 30 Nov 2011, 9:33 AM
  4. Making a panel grow when it's contents change
    By darrenb in forum Sencha Touch 1.x: Discussion
    Replies: 9
    Last Post: 23 Jul 2010, 12:05 AM
  5. Replies: 2
    Last Post: 30 May 2007, 1:48 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts