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>
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();
},
listeners: {
prefetch: 'updateLayout',
+ refresh: 'refresh',
},
},
},