Sitecore / jss

Software development kit for JavaScript developers building web applications with Sitecore Experience Platform
https://jss.sitecore.com
Apache License 2.0
261 stars 275 forks source link

Multi Select #246

Closed karsvaniersel closed 5 years ago

karsvaniersel commented 5 years ago

Is your feature request related to a problem? Please describe.

We have sitecore components that allow webmaster to make a multi selection of News Articles they want to show as highlighted on the homepage and/or related articles section. However with JSS they will have to give the source of these items, or have per article a checkbox which says something like featured, and with GraphQL we search for this field. Which is a bit of a workaround.

Describe the solution you'd like

As seen here: image (1)

The webmaster can easily select multiple items to the right side. With GraphQL we can easily parse this and get the single items based on the selected IDs.

Describe alternatives you've considered

Having a highlight/related checkbox per article. Then use GraphQL to check for this field and if selected, show it.

Or, how we do it currently, using the Sitecore component instead of a JSS component.

Additional information

A feature like this would really a lot of control to webmasters, without having to do much work arounds. A solution like this is straight forward for both parties. The webmaster only has to fill in the details once, and the App only has to parse 1 multi select box.

sc-dawidrutkowski commented 5 years ago

@kars-springbok Can you put some light on this: "However with JSS they will have to give the source of these items"?

I also do not understand the solution. You've written that "The webmaster can easily select multiple items to the right side". User can already do that by using the Multilist field.

karsvaniersel commented 5 years ago

Good point, however Multilist is also not useable with JSS. At least in the Code First approach.

sc-dawidrutkowski commented 5 years ago

@kars-springbok Are you talking about Multilist fields not being supported in Experience Editor? This is Experience Editor limitation. JSS provides a default field editor button for editing things like Multilists.

sc-dawidrutkowski commented 5 years ago

@kars-springbok Support of Multilists (e.g.: possibility to populate Multilist elements) was not added by purpose and we are not planning to do it. People should migrate to types which stored IDs (e.g.: DropTree) as it is much better to control referenced items in such way.