Ability for model to have Objects (key + value) for select option

Hello all,

Currently when creating a Slice, the model only allows for an array which sets the same label and value for each option.

Is there a way to separate the option name from value?

for basic example

"options": [ "Red #FF0000", "Blue #0000FF", "Green #00FF00" ]

Could become:

"options": [ {"Red": "#FF0000"}, {"Blue": "#0000FF" }, {"Green": "#00FF00"} ]

We then wouldn't need the hex value in the label for that option.

The first version works but requires some front-end splitting to get the desired value or a matching function. I can see this become complicated when dealing with larger options.

Thanks :slight_smile:

Hi Jake,

We've tracking this as an open feature request here:

But for the moment frontend splitting like you suggested is the only option.

1 Like

Hi Phil,

Thanks for getting back to me about this so quickly, much appreciated.

1 Like