簡體   English   中英

Extjs 經典網格面板滾動

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM