PDA

View Full Version : Scrollbar broken in treepanel



jpcook01
3 Oct 2011, 6:50 AM
Hi,

Is there some work around for this problem?
http://www.sencha.com/forum/archive/index.php/t-137737.html?

I have a treepanel and one of the docked items is a combo dropdown which when you select an item populates a different tree. It is easily repeatable to break the scrolling.

After lots of searching I have tried calling invalidateScroller on the treepanel when the store loads but that doesn't seem to do anything.



Ext.define('NavBuilder.TreePanelStore', {
extend: 'Ext.data.TreeStore',

model: 'NavBuilder.NavigationNode',
proxy: {
type: 'ajax'
},
listeners: {
load: function(store, records, successful, operation, eOpts ){
var treePanel = getTreePanel();
treePanel.invalidateScroller();
}
}

});


This is the onChangeHandler for the combo


onChangeHandler: function(combo) {
var tree = combo.up('treepanel');
var store = tree.getStore();

store.setProxy({
type: 'ajax',
url: 'sitemap/' + combo.getValue()
});

tree.setRootNode({
text: combo.getValue()
expanded: true
});

tree.invalidateScroller();

}


Obviously if this scroller doesn't work it makes the treepanel an unusable component.

Thanks
Jon

skirtle
3 Oct 2011, 11:46 AM
I'm not familiar with the specific case you've mentioned but there have been a number of problems with scrollbars in 4.0. This is one of the areas that has received a lot of attention in the upcoming 4.1 release.

jpcook01
4 Oct 2011, 1:12 AM
Any idea when this release is? It says mid to late September here:
http://www.sencha.com/blog/what-to-expect-in-ext-js-4-1/

Its October now :)

skirtle
4 Oct 2011, 12:18 PM
Some recent info on the 4.1 schedule here:

http://www.sencha.com/forum/showthread.php?142811-Ext-JS-4.1-Layout-and-Rendering-Performance&p=653166&viewfull=1#post653166