Results 1 to 4 of 4

Thread: Locked stateful grid + applyState throws error with column not in state

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Mar 2011
    Location
    Arvada, CO
    Posts
    404

    Default Locked stateful grid + applyState throws error with column not in state

    I have a locked, stateful grid that has dynamically created columns. Before reconfiguring the grid, I grab its current state (which means the dynamically added columns could potentially not be there), reconfigure the grid, and then apply the state.

    I realize the applyState method has repercussions that aren't really explained in the API, but have been commented on by support members saying that it's really only used in the initialization of the component... otherwise, it can cause issues (which might explain my issue). However, I'd still like to know if this is a bug... as it seems like defensive programming should be used here.

    Anyway, when you fire up my Fiddle, you'll see a blank screen... and that's because there's an error being thrown in the console. TypeError: colState is undefined, and I think this is because of absence of the colState check in Ext.grid.locking.HeaderContainer.applyColumnsState (line 47 in my Fiddle below). It appears that in a normal (not locked) grid, that my code works just fine, but because the locked grid uses a different HeaderContainer, I get my error. In a normal grid, the applyColumnsState appears to have checks for if the column state exists, but the locked HeaderContainer does not.

    So, is this a bug, or am I doing something wrong? It's good to note that this locked grid example works in Ext JS 5.1.1.



  2. #2
    Sencha User
    Join Date
    Apr 2013
    Posts
    908

    Default

    This bug report might be related.

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Location
    Arvada, CO
    Posts
    404

    Default

    Thanks! I've posted in the thread you linked.

  4. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Thanks for the report. I see the behavior in 6.0.2 but it seems to be fixed using a recent nightly. Are you able to confirm the same using a 6.0.3 nightly?

Similar Threads

  1. Replies: 5
    Last Post: 8 May 2017, 2:57 PM
  2. [OPEN] Stateful in a Locked Grid
    By flipperkid in forum Ext:Bugs
    Replies: 4
    Last Post: 10 Feb 2016, 11:02 AM
  3. Replies: 4
    Last Post: 22 May 2013, 2:08 AM
  4. Replies: 0
    Last Post: 24 Aug 2011, 11:06 AM
  5. Replies: 1
    Last Post: 17 Jun 2011, 2:15 AM

Posting Permissions

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