2

次のような単純なコンボボックスがあります。

                    {
                    xtype: 'combobox',
                    id: 'prd-main-group',
                    fieldLabel: 'ANA MAL GRUBU',
                    inputWidth: 320,
                    labelWidth: 160,
                    labelAlign: 'right',
                    margin: '15 0 0 0',
                    fieldStyle: 'height: 26px; text-align: right; font-size: 12pt; color:#505050',
                    store: articleMain,
                    valueField: 'WHG',
                    displayField: 'WHG_BEZ',
                    queryMode: 'remote',
                    autoSelect: false,
                    selectOnFocus: true,
                    hideTrigger: true,
                    msgTarget: 'side',
                    triggerAction: 'all',
                    typeAhead: true,
                    minChars: 2,
                    listeners: {
                        select: function (combo, selection) {
                            articleBase.proxy.extraParams = {'maingroup': combo.getValue()};
                            Ext.getCmp('prd-base-group').setDisabled(false);
                            Ext.getCmp('prd-base-group').getStore().removeAll();
                            Ext.getCmp('prd-base-group').setValue(null);
                            Ext.getCmp('prd-sub-group').getStore().removeAll();
                            Ext.getCmp('prd-sub-group').setValue(null);
                            articleBase.load();
                        },
                        focus: function(combo) {
                            combo.setValue('');
                        }
                    }
                },

2 つ以上の文字を入力すると、コンボボックスのドロップダウン リストが表示され、値が表示されますが、ドロップダウン リストから選択したレコードが自動的に配置されません。

添付のスクリーンショットを見るとわかるように、値は完成しましたが、ドロップダウンリストは選択されたレコードにフォーカスしていません!

ここに画像の説明を入力

私の質問は、いくつかの文字を入力すると、指定された文字に基づいてドロップダウン リストが自動的に変更されるはずです。

4

3 に答える 3

0

ForceSelection="true"+TypeAhead="true"そしてそれはうまくいくはずです

于 2013-07-31T09:04:46.223 に答える
0

で試してみてくださいautoSelect: true

于 2013-07-31T07:50:40.170 に答える