appbaseio / reactivesearch

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

RangeInput UrlParams #361

Closed ymzoughi closed 6 years ago

ymzoughi commented 6 years ago

Issue Type: Question

Platform: ReactiveSearch for Web

Description: Hello, is it possible to add the URLParams prop to RangeInput without displaying the url parameters in the initial state

divyanshu013 commented 6 years ago

Hi @ymzoughi currently its not possible since the query is applied for the entire range in RangeInput which updates its value in the ReactiveSearch store (thereby updating the URL).

We can probably filter out the URLs for RangeSlider and RangeInput components if the current values matches the extremes of their range.

metagrover commented 6 years ago

Hi @ymzoughi, you can always manage it on your own via onValueChange and defaultSelected on the range component.

onValueChange will give you the current value, which you can handle on your own to update the url, and on page loading, you can read the url param value to set the defaultSelected for the range component.

Hope that helps.

(Closing this issue, feel free to reopen if you have any further questions on this)