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 2020-07-28 14:32:10 +02:00 committed by Dietmar Maurer
parent be10cdb122
commit 80db161e05
1 changed files with 4 additions and 2 deletions

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);