This issue has been created
There are 2 updates, 1 comment.
 
 
Cristal / cid:jira-generated-image-avatar-117f2b93-0ed6-44cc-aa97-2aa9047f561b CRISTAL-875 Open

Support select items with a value distinct from their label

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-861f1b1b-3e8e-44ea-8517-a4b86cb6b32d Marius Dumitru Florea created this issue on 04/Nov/26 13:36
 
Summary: Support select items with a value distinct from their label
Issue Type: cid:jira-generated-image-avatar-117f2b93-0ed6-44cc-aa97-2aa9047f561b Improvement
Affects Versions: 1.9.1
Assignee: Unassigned
Components: Design System - Shoelace, Design System - Vuetify
Created: 04/Nov/26 13:36
Priority: cid:jira-generated-image-static-major-a309864d-559d-44ac-976a-4c5c2068258b Major
Reporter: Marius Dumitru Florea
Description:

The XSelect component of the design system only supports items that are plain strings, used both as the value and as the displayed label of the option. This doesn't work when the displayed label is not a suitable value, e.g. when it is localized (it changes with the locale), when it is loaded asynchronously, or when several items can have the same label.

XWIKI-23927 changes the XSelect API (@xwiki/platform-dsapi) so that an item can also be an object with distinct value and label properties (the new SelectItem type). The link modal's link type selector uses it, identifying each link type by its type while displaying its localized label.

The Shoelace and Vuetify implementations of XSelect need to support these items, otherwise they display "[object Object]" instead of the label in the link type selector.

 
 

2 updates

 
cid:jira-generated-image-avatar-861f1b1b-3e8e-44ea-8517-a4b86cb6b32d Changes by Marius Dumitru Florea on 04/Nov/26 13:36
 
Fix Version: 1.10.0
Assignee: Marius Dumitru Florea
 
 

1 comment

 
cid:jira-generated-image-avatar-861f1b1b-3e8e-44ea-8517-a4b86cb6b32d Marius Dumitru Florea on 04/Nov/26 13:41
 

See https://github.com/xwiki-contrib/cristal/pull/1862 .