Issue Type:
Help wanted
Platform:
ReactiveSearch for Web
Description:
is it possible to retrieve the current request to be able to save it ?
Reactivesearch version: x.y.z
V2
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:
Hey @ymzoughi, you can use onQueryChange prop on a component which gives you the previous and current query. For example:
<DataSearch
...
onQueryChange={(prevQuery, nextQuery) => ...}
/>
Exactly, I used onQueryChange, but this one was never executed
<DataSearch
componentId="searchbox"
dataField="modele"
highlightField="modele"
categoryField="properties.modele"
placeholder="..."
onQueryChange={(prevQuery, nextQuery) => console.log(prevQuery, nextQuery)}
/>
The query is only fired if some other component is watching this component. For example if you've a ReactiveList with a react prop, the query would get fired. Can you try this?
<DataSearch ... />
<ReactiveList
...
react={{
and: 'searchbox'
}}
/>
thank you so much, it works now !!!!
Most helpful comment
The query is only fired if some other component is watching this component. For example if you've a
ReactiveListwith areactprop, the query would get fired. Can you try this?