0

I'm using a Ext.grid.Panel with 'cellediting' plugin and 'grouping' features. My editor is a tagfield. I'm start editing the field and before I close the picklist (boundlist) clicking on groups headers (to fire blur event)

  1. the tag input is hidded but it's boundlist did not (if click on current group)
  2. the tag input is moved on top (if click on top groups)

Sencha Fiddle live preview: https://fiddle.sencha.com/#view/editor&fiddle/3ll2

Expand tagfield

  • click on above groups. click on group that is above

  • Click on group where current row is part of. click on current group

matei.nick
  • 161
  • 1
  • 5

2 Answers2

0

My Current fix:

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();
                }
            })
        }
    }
});
matei.nick
  • 161
  • 1
  • 5
0

The issue seems to be that when grouping the focus is not lost on the tagfield. Try this workaround: add a listener in your grid:

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

This will remove the focus on the tagfield and will force it to collapse.

Arthur
  • 398
  • 2
  • 7
  • They have some code in Grouping.js where they want to prevent focus (don't know the reason...) /** * Prevent focusing - it causes a scroll between mousedown and mouseup. * @private */ onGroupMousedown: function(view, rowElement, groupName, e) { e.preventDefault(); }, – matei.nick Oct 11 '22 at 08:49
  • 1
    I tried this solution in your fiddle and it works. – Arthur Oct 11 '22 at 14:42
  • BTW with the listener there is no need to override. – Arthur Oct 11 '22 at 17:48
  • I know, that with listener I don't have to override, but i have more grids with this 'problem' so I always prefer to 'hide' bugs from real implementations :) in special if this reproduces in more places Sencha team created bug EXTJS-29813 from this request. Thanks for feedback! – matei.nick Oct 18 '22 at 15:33