From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 4/6] ui: panel/ConfigPanel: return early on no selection
Date: Wed, 26 May 2021 11:01:10 +0200 [thread overview]
Message-ID: <20210526090112.23625-5-d.csapak@proxmox.com> (raw)
In-Reply-To: <20210526090112.23625-1-d.csapak@proxmox.com>
treelist technically allows deselection and this happens on destruction
in extjs 7.0 so simply return early to avoid errors accessing
components that do not exist anymore
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/manager6/panel/ConfigPanel.js | 3 +++
1 file changed, 3 insertions(+)
diff --git a/www/manager6/panel/ConfigPanel.js b/www/manager6/panel/ConfigPanel.js
index d7c36373..224bc768 100644
--- a/www/manager6/panel/ConfigPanel.js
+++ b/www/manager6/panel/ConfigPanel.js
@@ -68,6 +68,9 @@ Ext.define('PVE.panel.Config', {
singleExpand: false,
listeners: {
selectionchange: function(treeList, selection) {
+ if (!selection) {
+ return;
+ }
let view = this.up('panel');
view.suspendLayout = true;
view.activateCard(selection.data.id);
--
2.20.1
next prev parent reply other threads:[~2021-05-26 9:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-26 9:01 [pve-devel] [PATCH manager 0/6] fixes/preparation extjs 7.0 Dominik Csapak
2021-05-26 9:01 ` [pve-devel] [PATCH manager 1/6] ui: form/VMCPUFlagSelector: mark radio-buttons as 'not form fields' Dominik Csapak
2021-05-26 9:01 ` [pve-devel] [PATCH manager 2/6] ui: ResourceGrid: move first update to afterrender Dominik Csapak
2021-05-26 9:01 ` [pve-devel] [PATCH manager 3/6] ui: panel/ConfigPanel: change ui class to pve-nav Dominik Csapak
2021-05-26 9:01 ` Dominik Csapak [this message]
2021-05-26 9:01 ` [pve-devel] [PATCH manager 5/6] ui: tree/SnapshotTree: use beforedestroy instead of destroy Dominik Csapak
2021-05-26 9:01 ` [pve-devel] [PATCH manager 6/6] ui: form/CalendarEvent: remove displayField from config Dominik Csapak
2021-05-27 10:44 ` [pve-devel] applied: [PATCH manager 0/6] fixes/preparation extjs 7.0 Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210526090112.23625-5-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal