如何将附加按钮添加到列 header (extjs 6.2)

How to add an additional button to a column header (extjs 6.2)

我需要在过滤器菜单header列中添加一个按钮(如照片上的蓝色标记)

像这样的小黑客可能会奏效。只需对齐布局即可在 Container 的大部分左侧和右侧显示内容。

Ext.create('Ext.container.Viewport', {
layout: 'fit',

items: [{
    xtype: 'container',
    items: [{
        xtype: 'grid',
        sortable: true,
        columns: [{
            flex: 1
        }, {
            text: "Age",
            flex: 1
        }],
        listeners: {
            afterrender: function (grid) {
                var columns = grid.columnManager.getColumns();
                var nameCol = columns[0];
                var targetDom = nameCol.textInnerEl.dom;
                var newPanel = Ext.create('Ext.container.Container', {
                    items: [{
                        xtype: 'label',
                        text: "Name"
                    }, {
                        xtype: 'button',
                        text: "DO IT"
                    }],
                    renderTo: targetDom
                   });
               }
           }
        }]
   }]
});

Fiddle: https://fiddle.sencha.com/#view/editor&fiddle/29o8