[英]Extjs classic grid panel scroll
Extjs 6.2.0
有这个面板
Ext.create('Ext.grid.Panel', {
region: 'center',
padding: 5,
reserveScrollbar: false,
scrollable: true,
columnLines: false,
rowLines: false,
disableSelection: true,
viewConfig: {
stripeRows: false,
trackOver: false,
preserveScrollOnRefresh: true
},
store: 'chatmessagesstore',
hideHeaders: true,
.....
和一列带渲染器
带有布局边框的 Ext.form.Panel 中的网格。 和窗口中的 Ext.form.Panel 布局适合。 Store 是 MemoryStore
我将记录添加到存储中,然后将其显示在网格中。 但是如果我添加超过 50 条记录来存储,我会在网格底部看到空白区域。 在最后一个 Chrome 中,我看到了空白。 在上一个“人造卫星”浏览器(俄语)中,我看不到空格
我认为这是错误的滚动条计算。 但是怎么解决呢? 我的头坏了)
在您的网格中将 bufferedRenderer 属性设置为 false ..
...
...
/**
* Create chat box
*
* @return {Ext.grid.Panel}
*/
createChatBox: function () {
var me = this;
if (!me.chatBox) {
console.log('creating');
this.chatBox = Ext.create('Ext.grid.Panel', {
region: 'center',
padding: 5,
reserveScrollbar: false,
scrollable: true,
columnLines: false,
rowLines: false,
disableSelection: true,
bufferedRenderer: false, // SET IT TO FALSE
viewConfig: {
stripeRows: false,
trackOver: false,
preserveScrollOnRefresh: true
},
store: 'chatmessagesstore',
hideHeaders: true,
columns: [{
...
...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.