簡體   English   中英

ExtJS 具有功能的網格。分組和編輯插件。具有組合或標簽字段的單元格編輯器在單擊組時不會關閉編輯器

[英]ExtJS grid with feature.Grouping and editing plugin.cellediting that has combo or tagfield will not close editor when click on groups

我正在使用帶有“cellediting”插件和“分組”功能的 Ext.grid.Panel。 我的編輯器是一個標簽域。 我開始編輯該字段,然后在關閉選擇列表(邊界列表)之前單擊組標題(以觸發模糊事件)

  1. 標簽輸入被隱藏但它的綁定列表沒有(如果點擊當前組)
  2. 標簽輸入移到頂部(如果單擊頂部組)

Sencha Fiddle 直播預覽: https://fiddle.sencha.com/#view/editor&fiddle/3ll2

展開標簽域

  • 點擊上面的組。 點擊上面的組

  • 單擊當前行所屬的組。 點擊當前組

我當前的修復:

Ext.define("Ext.fix.grid.feature.Grouping", {
    override: 'Ext.grid.feature.Grouping',

    afterViewRender: function(view) {
        // without callParent the problem is not reproduced,
        // but colapse/expand is not working
        this.callParent(arguments);

        if (view.editingPlugin) {
            view.on({
                beforegroupclick: function(grid) {
                    view.editingPlugin.completeEdit();
                }
            })
        }
    }
});

問題似乎是在分組時焦點不會丟失在標簽字段上。 試試這個解決方法:在你的網格中添加一個監聽器:

listeners: {
    groupclick: function (vw, node, group, e, opts) {
                this.focus();
                }
}

這將移除標記域上的焦點並強制它折疊。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

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