Results 1 to 3 of 3

Thread: Column header height is not updated correctly

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha Premium Member ragzovskii's Avatar
    Join Date
    Sep 2012
    Location
    Krasnoyarsk, Russia
    Posts
    242

    Default Column header height is not updated correctly

    Hello.
    We render custom content to the grid header and expect it to fit normally. But it doesn't when we disable flag 'variableRowHeight'. As we can see, that happens because layout is not updated (see Ext.view.Table#refreshSize method) Please refer to this fiddle:

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,257

    Default

    This isn't a bug. The raw DOM of the header is being manipulated without notifying the layout system, so it can't react accordingly.

    It just so happens in the case of variable row heights it may also update the column headers, but that's not a behaviour to be relied upon.

    The addStuff method should call updateLayout:

    Code:
    addStuff: function () {
        var innerCt      = this.myContainer,
            ctDom        = innerCt.dom,
            oldDisplay   = ctDom.style.display,
            parent       = ctDom.parentNode;
    
        ctDom.style.display = 'none';
        parent.removeChild(ctDom);
    
        var content = '<div style="width:50px;height:' +
            (20 * (++counter % 3)) + 'px;">' +
            counter + '</div>';
    
        console.log(content);
        ctDom.innerHTML = content;
    
        parent && parent.appendChild(ctDom);
        ctDom.style.display = oldDisplay;
        
        this.updateLayout();
    }
    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.

  3. #3
    Sencha Premium Member ragzovskii's Avatar
    Join Date
    Sep 2012
    Location
    Krasnoyarsk, Russia
    Posts
    242

    Default

    As I can conclude from updateLayout docs, new header height will trigger view layout also. So if we update header like that and grid is configured with variableRowHeight, I assume that will trigger unnesessary layouts. Do I understand this process correctly? Can you recommend smth to avoid extra layouts?

Similar Threads

  1. Replies: 1
    Last Post: 3 Jun 2014, 12:29 PM
  2. Column Header Height diminishing issue with IE9
    By om narayan in forum Sencha GXT Bugs
    Replies: 0
    Last Post: 16 Oct 2013, 7:56 AM
  3. Column Header Height
    By bennie98 in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 2 Apr 2013, 7:48 PM
  4. Replies: 1
    Last Post: 8 Nov 2012, 7:01 AM
  5. [FNR] [1.1] Column Header in Grid doesn't updated dynamically
    By dardison in forum Ext GWT: Bugs (1.x)
    Replies: 6
    Last Post: 22 Oct 2008, 12:16 PM

Posting Permissions

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