0

I am trying to combine label values in the SingleDataList on reactive search. Using the example they provide below:

https://codesandbox.io/s/github/appbaseio/reactivesearch/tree/dev/packages/web/examples/SingleDataList?from-embed

This is the example they provide

                        <SingleDataList
                            title="SingleDataList"
                            componentId="CitySensor"
                            dataField="group.group_topics.topic_name_raw.raw"
                            data={[
                                { label: 'Open Source', value: 'Open Source' },
                                { label: 'Social', value: 'Social' },
                                { label: 'Adventure', value: 'Adventure' },
                                { label: 'Music', value: 'Music' },
                            ]}
                        />

My question is if its possible to combine the values of Social and Adventure into another label called "Social+Adventure"?

I have tried to use some logical operators below to test it out, as shown below but doesn't work.

                        <SingleDataList
                            title="SingleDataList"
                            componentId="CitySensor"
                            dataField="group.group_topics.topic_name_raw.raw"
                            data={[
                                { label: 'Open Source', value: 'Open Source' },
                                { label: 'Social + Adventure', value: 'Adventure' && 'Socal' },
                                { label: 'Music', value: 'Music' },
                            ]}
                        />

Would there be any way that this is possible?

Thank you

David Ramsdale
  • 113
  • 1
  • 5

0 Answers0