* [pve-devel] [PATCH widget-toolkit] form/RoleSelector: fix for pve
@ 2022-07-22 7:35 Dominik Csapak
2023-01-10 10:55 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2022-07-22 7:35 UTC (permalink / raw)
To: pve-devel
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>
---
src/form/RoleSelector.js | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/form/RoleSelector.js b/src/form/RoleSelector.js
index d82c980..7d897f9 100644
--- a/src/form/RoleSelector.js
+++ b/src/form/RoleSelector.js
@@ -30,8 +30,15 @@ Ext.define('Proxmox.form.RoleSelector', {
header: gettext('Privileges'),
dataIndex: 'privs',
cellWrap: true,
- // join manually here, as ExtJS joins without whitespace which breaks cellWrap
- renderer: v => v.join(', '),
+ renderer: (v) => {
+ if (Ext.isArray(v)) {
+ // join manually here, as ExtJS joins without whitespace which breaks cellWrap
+ return v.join(', ');
+ }
+
+ // add space after comma for cellWrap
+ return v.replaceAll(',', ', ');
+ },
flex: 5,
},
],
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH widget-toolkit] form/RoleSelector: fix for pve
2022-07-22 7:35 [pve-devel] [PATCH widget-toolkit] form/RoleSelector: fix for pve Dominik Csapak
@ 2023-01-10 10:55 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2023-01-10 10:55 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
Am 22/07/2022 um 09:35 schrieb Dominik Csapak:
> 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>
> ---
> src/form/RoleSelector.js | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
>
applied, but squashed in a clean-up to make this a one-liner again (no need for
exploding relatively trivial things to much line wise), thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-10 10:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-22 7:35 [pve-devel] [PATCH widget-toolkit] form/RoleSelector: fix for pve Dominik Csapak
2023-01-10 10:55 ` [pve-devel] applied: " Thomas Lamprecht
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