appbaseio / reactivesearch

Search UI components for React and Vue
https://opensource.appbase.io/reactivesearch
Apache License 2.0
4.9k stars 466 forks source link

Selected value for Single/MultiList #125

Open metagrover opened 6 years ago

metagrover commented 6 years ago

Currently, the selected value from Single/MultiList is returned as a string or an array of strings in props like onValueChange(..) and beforeValueChange(..). Hence, in the current case, we miss out on the doc_count of the selected values.

To enable consistency across all the components, we should return the selected value as an object or an array of objects, where the shape of object is:

{
    label: <string>,
    count: <doc_count>
}
siddharthlatest commented 6 years ago

@metagrover Can you elaborate? The context isn't clear.

siddharthlatest commented 6 years ago

Needs more thought, use-case for doing this isn't clear at the moment.