appbaseio / reactivesearch

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

MultiDataList filters are applied based on the label field and not it's value #244

Closed mrtinkz closed 6 years ago

mrtinkz commented 6 years ago

Issue Type:

bug Description:

MultiDataList filters are applied based on the label and not it's value. In the below code snippet when an option is selected, it's label (data collection object label field) is used to apply filters on ResultSet and not it's value, which results in not returning any data. The issue can be replicated by changing the case of Open Source to open Source in the label using this link

<MultiDataList
    title="MultiDataList"
    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' },
    ]}
/>

Screenshots:

Minimal reproduction of the problem with instructions:

Reactivesearch version: 2.2.1

Browser: [all | Chrome XX | Firefox XX | Edge XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Anything else:

dhruvdutt commented 6 years ago

@mrtinkz Thanks for the report. We've identified the issue you're facing and should be resolving it in the next release which will be happening soon.

metagrover commented 6 years ago

@dhruvdutt Check this with SingleDataList as well.

divyanshu013 commented 6 years ago

Thanks for contributing, this will be fixed in the upcoming release v2.3.0 🥂