[英]Grid scrolling issue in EXT.JS 4.0.5, not accounting for toolbar heights
I've got this grid: 我有这个网格:
Any idea why it would be doing this? 知道为什么会这样做吗? I know the inner panel needs to be 350px, and applying this in firebug works fine, but of course Ext likes to recalculate everything on the fly and I can't figure out where to apply a height to the inside panel to get it to show the right behavior.
我知道内部面板需要为350px,并且在萤火虫中应用此方法效果很好,但是Ext当然喜欢动态地重新计算所有内容,而且我不知道在哪里向内部面板应用高度以使其显示正确的行为。
I'm aware 4.0.5 uses virtual scrollbars, and I've disabled them by setting scroll: false
on the grid component, and adding style: { overflowX: 'hidden', overflowY: 'scroll' }
to its viewconfig. 我知道4.0.5使用虚拟滚动条,并且已通过在网格组件上设置
scroll: false
并在其viewconfig中添加style: { overflowX: 'hidden', overflowY: 'scroll' }
来禁用了它们。 The problem is that the inside panel isn't accounting for the toolbar heights, and its pushing the scrollbar under its container. 问题在于,内部面板不能说明工具栏的高度,而不能将滚动条推入其容器下方。 I can't upgrade extjs, either.
我也不能升级extjs。 Any ideas?
有任何想法吗?
This looks like a bug that was addressed in 4.1, however I can't really test your code so it's hard to tell, you can try doing this in the grid's viewready
event: 这看起来像是4.1中解决的错误,但是我无法真正测试您的代码,因此很难说,您可以在网格的
viewready
事件中尝试执行此viewready
:
grid.determineScrollbars();
As covered here in the 4.07 docs. 作为覆盖这里在4.07文档。
Edit: 编辑:
How about simply trying to relayout the component after the viewready
event: 如何在
viewready
事件之后简单地尝试重发组件:
grid.on('viewready', function(grid) {
grid.doComponentLayout()
});
(Or the MVC way for event handling if you're using that) (如果您使用的是事件处理的MVC方式)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.