View Full Version : combox in class extend picker bug

16 Feb 2012, 1:03 AM
i create a class extend picker like this,

Ext.define('Ext.ux.form.ComboxGrid', {
extend: 'Ext.form.field.Picker',
alias: ['widget.combogrid'],
mixins: {
bindable: 'Ext.util.Bindable'
createPicker: function () {
var me = this,
menuCls = Ext.baseCSSPrefix + 'menu',
var cbQuery = Ext.create('Ext.form.field.ComboBox', {
hideLabel: true,
width: 110,
name: 'cbfieldName',
id: me.id + '_cbQueryField',
displayField: 'COLUMNNAME',
valueField: 'COLUMNVALUE',
store: me.colStore,
queryMode: 'local',
editable: false,
emptyText: 'please select a field',
forceSelection: true
picker = me.picker = Ext.create('Ext.grid.Panel', {
ownerCt: me.up('[floating]'),
cls: me.el.up('.' + menuCls) ? menuCls : '',
floating: true,
width: me.lstWidth,
columns: me.grdCols,
store: me.store,
tbar: [
bbar: Ext.create('Ext.toolbar.Paging', {
store: me.store,
displayInfo: true
me.mon(picker, {
'itemdblclick': me.onItemdblclick,
scope: me
return picker;

then when I use the comboxgrid in the formpanel, when click the cbQuery's subitem it will cause the whole floatlayer close ,then it can't select the combox item

16 Feb 2012, 5:13 AM
The picker is going to place a listener on the body to see if it is clicked outside of it and sounds like it is registering the click outside so it closes the picker.

16 Feb 2012, 6:29 PM
then the comboxgrid can't use in the picker ?
Or I should put the listener on the body to see the click is out the picker or the comboxgrid?