4
votes

I have a custom picker class with some text fields and a combobox inside. A grid in the app is using this picker as an editor for a column, but the problem is that anytime I click the combobox, the picker loses it's focus and closes. Is there a way to modify the picker in order to use the combobox for select data?

1
If possible, please share the codeSharpCoder
use "CD"s workaround, jsfiddle.net/8E85CkdaShivantha

1 Answers

1
votes

I found a workaround for this issue by using the collapseIf function.

This code checks if the event target is a BoundList (internally used DataView for ComboBox) and part of the picker component:

collapseIf: Ext.Function.createInterceptor(Ext.form.field.Picker.prototype.collapseIf, function (e) {
        var boundList = Ext.get(e.target).up('.x-boundlist'),
            cmp;

        cmp = boundList && Ext.getCmp(boundList.id);

        if (cmp && this.picker.down('#' + cmp.pickerField.id)){
            return false;
        }
    })