From 80db161e05c4c0a19d88a3bffe684d3af9afe9c3 Mon Sep 17 00:00:00 2001 From: Stefan Reiter Date: Tue, 28 Jul 2020 14:32:10 +0200 Subject: [PATCH] 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 --- www/DataStoreContent.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/DataStoreContent.js b/www/DataStoreContent.js index 5f407e98..1c08f56a 100644 --- a/www/DataStoreContent.js +++ b/www/DataStoreContent.js @@ -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);