Opened 8 years ago

Closed 7 years ago

#13617 closed defect (patchwelcome)

TreeGrid will not expand rows when defaultOpen is false and store identifiers are not strings

Reported by: Colin Snover Owned by: Evan
Priority: high Milestone: tbd
Component: DojoX Grid Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:

Description

In dojox/grid/cells/tree.js, calls to dojox.grid.cells.TreeCell.getOpenState return the wrong value if an item identifier is not a string. Specifically, lines 27-29 (in 1.6.1) state the following:

if(typeof itemId != "string" || !(itemId in this.openStates)){
  this.openStates[itemId] = grid.getDefaultOpenState(this, itm);
}

This means that stores that e.g. use numbers instead of strings for their identifier values can never open a tree if its default state is closed. It’s not entirely clear to me why this code exists the way it does; it seems as though the typeof check should simply be removed, but I am not familiar enough with TreeGrid? to know for sure if that would cause other undesirable side-effects.

Change History (3)

comment:1 Changed 8 years ago by Evan

Owner: changed from evan to Evan

comment:2 Changed 7 years ago by bill

DojoX Grid and EnhancedGrid are deprecated in favor of dgrid and gridx.

You should upgrade your code to use one of those two grids.

We will consider patches to the old DojoX Grid code though.

comment:3 Changed 7 years ago by bill

Resolution: patchwelcome
Status: newclosed
Note: See TracTickets for help on using tickets.