ExtJs - Javascript -网格中的组合框(单元格编辑插件)-网格/窗口后面的下拉列表

ExtJs - Javascript - ComboBox in Grid (Cell editing plugin) - Drop down list behind the Grid/Window

本文关键字:网格 窗口 下拉列表 插件 Javascript 组合 单元格 ExtJs 编辑      更新时间:2023-09-26

我有一个网格上的单元格编辑插件。当我点击我想要编辑的单元格时,有时组合框的下拉列表在网格/窗口后面(我看不到它,但如果我修改窗口大小,我可以看到它后面的组合框项)。

我的代码看起来像这样(我有一个窗口,其中包含这个表单):

items: [{
    xtype: 'form',
    items: [
    me.currentMultipleValuesGrid = Ext.create('Ext.grid.Panel', {
        store: me.gridStoreToValidate,
        plugins: [Ext.create('Ext.grid.plugin.CellEditing', {
            clicksToEdit: 1,
            delay: 10
        })],
        listeners: {
            validateedit: function (editor, cell, eOpts) {
                //cell.cancel = true;
            }
        },
        columns: [{
            header: GTR(CLNAME(me), 'colSource.Text', 'Source'),
            dataIndex: 'source',
            flex: 1
        }, {
            dataIndex: 'name',
            header: GTR(CLNAME(me), 'colLinkDestination.Text', 'Link destination'),
            editor: {
                xtype: 'combobox',
                queryMode: 'local',
                valueField: 'nr',
                displayField: 'name',
                store: me.comboBoxEditorStore,
                listeners: {
                    change: function (thisCmb, newValue, oldValue) {
                    },
                    beforerender: function (thisCmb, eOpts) {
                    }
                }
            },
            flex: 1
        }, {
            dataIndex: 'linkdestination',
            hidden: true
        }]
    })]
}]

我认为这是一个布局问题,所以我尝试了不同的布局(锚和适合)分配给窗口,网格或形式,与他们的各种组合。到目前为止还没有成功。什么好主意吗?谢谢你!我使用Extjs 4.0.7

我不久前解决了这个问题。回来把答案贴出来,以防有人需要。似乎这是一个Sencha错误,导致下拉列表显示在窗口后面,当窗口是模态(就像在我的情况下)。我设法使一个解决方案,通过分配一个css类的组合的下拉列表,通过在组合设置:

listConfig: { cls: 'clsZIndexMax' }

其中clsZIndexMax是包含z-index: 100000 !important;的css类

PS:我在4.0.7版本中有这个bug,不知道他们是否已经在未来的版本中解决了。