[PATCH pve-manager v4 14/17] ui: cpu flags selector: fix buffered rendering error

Arthur Bied-Charreton
2026-04-30T16:03:30Z

When the flags are queried from /cluster/qemu/cpu-flags, Ext.js uses
buffered rendering, and we have to use a different helper to refresh the
view [0][1].

Not doing so creates random-looking rendering errors, in this case the
radio group was missing from random flags, changing every time the
buffer would be re-rendered.

[0] https://docs.sencha.com/extjs/6.2.0/classic/Ext.view.AbstractView.html#method-refresh
[1] https://docs.sencha.com/extjs/6.2.0/classic/Ext.grid.plugin.BufferedRenderer.html#method-refreshView

Signed-off-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
---
www/manager6/form/VMCPUFlagSelector.js | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/www/manager6/form/VMCPUFlagSelector.js b/www/manager6/form/VMCPUFlagSelector.js
index 13a43210..3cc66a3e 100644
--- a/www/manager6/form/VMCPUFlagSelector.js
+++ b/www/manager6/form/VMCPUFlagSelector.js
@@ -155,7 +155,20 @@ Ext.define('PVE.form.VMCPUFlagSelector', {
store.insert(0, newUnknownFlags);
}

- me.getView().refresh();
+ // Ext.js uses buffered renderers for larger lists, i.e. in this case, the flags
+ // queried from /cluster/qemu/cpu-flags, which returns all possible QEMU flags. In
+ // this case, we cannot use AbstractView.refresh [0] and have to fall back to
+ // BufferedRenderer.refreshView [1], otherwise we get interesting rendering errors, in
+ // this case radio groups missing from random flags.
+ //
+ // [0] https://docs.sencha.com/extjs/6.2.0/classic/Ext.view.AbstractView.html#method-refresh
+ // [1] https://docs.sencha.com/extjs/6.2.0/classic/Ext.grid.plugin.BufferedRenderer.html#method-refreshView
+ let plugin = me.findPlugin('bufferedrenderer');
+ if (plugin === undefined) {
+ me.getView().refresh();
+ } else {
+ plugin.refreshView();
+ }
},
isDirty: function () {
let me = this;
--
2.47.3