I have a page with the SXA search result component. I want to refresh the search result on the click of a button. Please let me know if it is possible.
Sitecore Stack Exchange is a question and answer site for developers and end users of the Sitecore CMS and multichannel marketing software. It only takes a minute to sign up.Sign up to join this community
The easiest way is to update hash in the URL (search parameters)
Search Results will reload once hash parameter in the URL will change.
You can do it like this
window.location.hash = "foo=1"
You can add parameter that does nothing like I did and increment its value.
To trigger it again you will have to assign different value (
If you have other search renderings on a page which add their own parameters to the hash you will have to fetch current value, modify it and then assign.