DynamicRangeSlider work According to customQuery , onchange Slider render the results(products)
Issue Type: Bug Report. Platform: Web
Description: In DynamicRangeSlider I am using customQuery according to my requirement that Showing all products according to customQuery. But issue is that if I slide the silder, others Components like Resultcard , Multulist etc. value is not change.
I have data which contain one field "min_price" . but issue is that in some products "min_price" Field is not exists OR in some products "min_price" Field is exists but value is NULL, so for that i use customQuery in DyanamicRangeSilder accoding to this above conditions.
This is the code that show all products according to some products "min_price" Field is not exists OR in some products "min_price" Field is exists but value is NULL.
<DynamicRangeSlider
componentId="DynamicRangeSensor"
dataField="min_price"
title="Price Range"
customQuery={
function(value, props) {
return {
"query" : {
"bool" : {
"filter" : {
"bool" : {
"should" : [
{ "bool" : {
"must" : [
{ "exists" : {"field" : "min_price"}
]
}},
{ "bool" : {
"must_not" : [
{ "exists" : {"field" : "min_price"}}
]
}}
]
}
}
}
}
}
}
}
showHistogram = {false}
defaultSelected={(min, max) => (
{
"start": min,
"end": max
}
)}
rangeLabels={(min, max) => (
{
"start": "$ "+ min ,
"end": "$ "+ max
}
)}
/>
Reactivesearch version: v2.0.0
How to reslove this issue and render products according to user silde the slider ???
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 ]
The same issue I am facing. Is there any way to fix this type of issue.
Not sure if I understand this issue completely, but if you have your is Result component watching the DynamicRangeSlider (whether you are using the customQuery or not), it should update the Results. So, make sure you have DynamicRangeSlider's componentId listed in Result Component's react prop.
👉 Read about DynamicRangeSlider usage here.
👉 Read about react prop usage here.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.