在ExtJS 7.7网格经典工具包中,当使用单元格编辑插件时,我无法显示组合框选项。 这发生在 ExtJS Kitchensink 示例本身中。这很可能是一个错误。在 ExtJS 7.6 中没有任何问题
Ext.define('KitchenSink.view.grid.CellEditing', { 扩展:'Ext.grid.Panel', xtype: '单元格编辑', 控制器:“单元格编辑”,
requires: [
'Ext.selection.CellModel'
],
title: 'Cell Editing Plants',
width: 680,
height: 350,
autoLoad: true,
frame: true,
selModel: {
type: 'cellmodel'
},
plugins: {
cellediting: {
clicksToEdit: 1
}
},
store: {
model: 'KitchenSink.model.Plant',
proxy: {
type: 'ajax',
url: 'data/grid/plants.xml',
reader: {
type: 'xml', // XmlReader since returned data is in XML
record: 'plant' // records are in 'plant' tags
}
},
sorters: [{
property: 'common',
direction: 'ASC'
}]
},
columns: [{
header: 'Common Name',
dataIndex: 'common',
flex: 1,
editor: {
allowBlank: false,
selectOnFocus: false
}
}, {
header: 'Light',
dataIndex: 'light',
width: 130,
editor: {
xtype: 'combo',
typeAhead: true,
triggerAction: 'all',
selectOnFocus: false,
store: [
['Shade', 'Shade'],
['Mostly Shady', 'Mostly Shady'],
['Sun or Shade', 'Sun or Shade'],
['Mostly Sunny', 'Mostly Sunny'],
['Sunny', 'Sunny']
]
}
}, {
header: 'Price',
dataIndex: 'price',
width: 70,
align: 'right',
formatter: 'usMoney',
editor: {
xtype: 'numberfield',
selectOnFocus: false,
allowBlank: false,
minValue: 0,
maxValue: 100000
}
}, {
xtype: 'datecolumn',
header: 'Available',
dataIndex: 'availDate',
width: 95,
format: 'M d, Y',
editor: {
xtype: 'datefield',
selectOnFocus: false,
format: 'm/d/y',
minValue: '01/01/06',
disabledDays: [0, 6],
disabledDaysText: 'Plants are not available on the weekends'
}
}]
});
当您单击 并处于编辑模式时,您无法单击下拉触发器来显示组合框和日期字段中的选项
这可能是一个错误。请给出解决方法。或者您是否知道新版本已修复此错误?
该问题似乎出现在 7.7 版本中。您可以尝试使用以下解决方法来解决该问题。
Ext.define('null', {
override: "Ext.view.Table",
focusPosition: function() {
Ext.emptyFn();
},
});