ui: fix error when reloading DataStoreContent

...when an entry is selected, that doesn't exist after the reload.

E.g. when one deletes selects a file within a snapshot and then clicks
the delete icon for said snapshot, focusRow would then fail and the
loading mask stay on until a reload.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
Stefan Reiter authored and Dietmar Maurer committed 2020-07-29 07:13:12 +02:00
1 parent be10cdb122
commit 80db161e05
1 file changed
+4 -2
+4 -2
View File
@@ -232,8 +232,10 @@ Ext.define('PBS.DataStoreContent', {
}
return selected === id;
}, undefined, true);
view.setSelection(selection);
view.getView().focusRow(selection);
if (selection) {
view.setSelection(selection);
view.getView().focusRow(selection);
}
}
Proxmox.Utils.setErrorMask(view, false);