privilege role selector: fix renderer for Proxmox VE

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>
This commit is contained in:
Dominik Csapak 2022-07-22 09:35:24 +02:00 committed by Thomas Lamprecht
parent c8bae5b130
commit 9e12fc0203

View 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,
},
],