fix #2680: make Quarantine E-Mail list searchable

using an explicit load on time change and queryMode 'local', we can
enable typeAhead (and related settings) to let the user type in an email
which will be autocompleted by the loaded list.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-04-15 09:56:43 +02:00 committed by Thomas Lamprecht
parent 72d8403cb6
commit 61a8a658d2

View File

@ -142,10 +142,8 @@ Ext.define('PMG.QuarantineList', {
return; return;
} }
// the combobox does not know anything about the extraparams
// so we disable queryCaching until we expand (and query) again
combobox.queryCaching = false;
combobox.getStore().getProxy().setExtraParams(params); combobox.getStore().getProxy().setExtraParams(params);
combobox.getStore().load();
me.load(); me.load();
}, },
@ -164,11 +162,6 @@ Ext.define('PMG.QuarantineList', {
me.load(); me.load();
}, },
setQueryCaching: function() {
this.lookupReference('email').queryCaching = true;
},
savePosition: function(grid, selected, eopts) { savePosition: function(grid, selected, eopts) {
if (!selected.length) { if (!selected.length) {
return; return;
@ -189,11 +182,7 @@ Ext.define('PMG.QuarantineList', {
selectionchange: 'savePosition' selectionchange: 'savePosition'
}, },
'combobox[reference=email]': { 'combobox[reference=email]': {
change: { change: 'changeEmail',
fn: 'changeEmail',
buffer: 500
},
expand: 'setQueryCaching'
}, },
datefield: { datefield: {
change: { change: {
@ -257,11 +246,14 @@ Ext.define('PMG.QuarantineList', {
} }
] ]
}, },
queryParam: false, queryMode: 'local',
queryCaching: false, editable: true,
editable: false, typeAhead: true,
forceSelection: true,
autoSelect: true,
anyMatch: true,
selectOnFocus: true,
reference: 'email', reference: 'email',
name: 'email',
fieldLabel: 'E-Mail' fieldLabel: 'E-Mail'
} }
] ]