]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
privilege role selector: fix renderer for Proxmox VE
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 22 Jul 2022 07:35:24 +0000 (09:35 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 9 Jan 2023 13:23:38 +0000 (14:23 +0100)
In PBS we get an array here, so the renderer is fine, but in pve it's
just a long string, so add a space after commas to achieve the same
effect.

Without this, the second column is not visible in pve because of an
error in the renderer (no 'join' function on a string)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ T: squash in code-reduction to make it a one-liner again ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/form/RoleSelector.js

index d82c980484e42d75bf2892c6177d2612b3aa40b4..b4b6357d93579c2fa39f57b2712f87caac3a0290 100644 (file)
@@ -31,7 +31,7 @@ Ext.define('Proxmox.form.RoleSelector', {
                dataIndex: 'privs',
                cellWrap: true,
                // join manually here, as ExtJS joins without whitespace which breaks cellWrap
-               renderer: v => v.join(', '),
+               renderer: v => Ext.isArray(v) ? v.join(', ') : v.replaceAll(',', ', '),
                flex: 5,
            },
        ],