extjs树面板中的滚动条不起作用

ale*_*lex 2 javascript extjs scrollbar treepanel

有时,我的树面板的滚动条不再起作用.虽然仍然可以移动滚动条,但树根本不会移动.这在我和Firefox以及Chrome中都会发生.

这是我的树面板的来源:

var treeStore = Ext.create('Ext.data.TreeStore', { proxy: { type: 'ajax', url: '../tree.pl' } });

var tree = Ext.create('Ext.tree.Panel', { store: treeStore, renderTo: 'tree', title: 'Tree', width: 400, height: 450, rootVisible:false, dockedItems: [{ xtype: 'toolbar', dock: 'bottom', items: [ { xtype: 'tbspacer', width: 340 }, { text: 'Search', handler: function(){ names = []; Ext.Array.each(tree.getView().getChecked(), function(rec){ names.push(rec.get('text')); });

                    resultStore.load({
                        params:{
                            search_type: 'tree',
                            tree_nodes: names.join('II'),
                        }
                    });
                }
    }
    ]
}]
Run Code Online (Sandbox Code Playgroud)

});

Mol*_*Man 8

我遇到了同样的问题.他们使用自定义滚动条,它很漂亮(特别是在chrome中).要删除自定义滚动条,请将以下内容添加到配置中:

var tree = Ext.create('Ext.tree.Panel', {
  scroll          : false,
  viewConfig      : {
    style           : { overflow: 'auto', overflowX: 'hidden' }
  },
  // ...
});
Run Code Online (Sandbox Code Playgroud)

我没有尝试过treepanel.但它对于gridpanel非常有效(因为树和网格都只是Ext.panel的扩展.但是解决方案也适用于treepanel).