SitePen/dgrid — Issue #81: DOMException when initializing dgrid with JsonRest store in hidden tab
Author: jason0x43
Created: 2012-02-13 18:37:49+00:00
State: open

Whenever I create page in which a dgrid uses a JsonRest store and is in a hidden tab of a TabContainer (one that is not the initially selected one), I get DOMExceptions and a somewhat screwed up dgrid. In particular, the dgrid has a large empty space under the last row of data, and scrolling to the bottom or top of the dgrid's data throws additional DOMExceptions. The exceptions are generated by line 437 in List.js.

If I click on one of the column headers to sort the dgrid (once its tab is visible), it resets its layout and works fine. If the dgrid initializes on a visible tab instead of an unselected tab, it's fine. If I use a Memory store instead of a JsonRest, it's fine even if the dgrid is initialized in a hidden tab. If the dgrid is initialized in a hidden tab but without a store, and then the store is set (via setStore) once the dgrid is visible, it's fine.

My fix so far is just to add a listener to the TabContainer and set the dgrid's store once the dgrid's tab becomes visible, but this seems less than ideal.