mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-12-31 18:51:51 +00:00
node/Tasks: deselect entries when filter changes
since we use a remotefilter on a bufferedstore, the only event where we can check if the selected element is still there is the 'refresh' event. Simply deselect if the seleceted element is not in the store Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
f00e321173
commit
12a6f6824f
@ -44,6 +44,20 @@ Ext.define('Proxmox.node.Tasks', {
|
||||
me.getView().updateLayout();
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
let me = this;
|
||||
let view = me.getView();
|
||||
|
||||
let selection = view.getSelection();
|
||||
let store = me.getViewModel().get('bufferedstore');
|
||||
if (selection && selection.length > 0) {
|
||||
// deselect if selection is not there anymore
|
||||
if (!store.contains(selection[0])) {
|
||||
view.setSelection(undefined);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
sinceChange: function(field, newval) {
|
||||
let me = this;
|
||||
let vm = me.getViewModel();
|
||||
@ -144,6 +158,7 @@ Ext.define('Proxmox.node.Tasks', {
|
||||
},
|
||||
listeners: {
|
||||
prefetch: 'updateLayout',
|
||||
refresh: 'refresh',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user