InfiniteHits "Show more" button not working when setting the "aroundRadius" query parameter
See original GitHub issueDescribe the bug 🐛 Setting the ‘aroundRadius’ param , the “Show more” button stops working (widget InfiniteHits). Nothing is displayed in my FF Dev Console (not even the Http POST request querying Algolia servers, so no query is performed)
Commenting the following line solves the problem:
helper.setQueryParameter('aroundRadius', 75000);
const search = instantsearch({
appId: 'latency',
apiKey: '6be0576ff61c053d5f9a3225e2a90f76',
indexName: 'instant_search',
searchParameters: {
hitsPerPage: 8,
},
searchFunction: function (helper) {
helper.setQueryParameter('aroundRadius', 75000);
helper.search();
}
});
Another Search
instance (searching on a replica) on the same page still has its “Show more” button working while the bug is present for the first Search
instance.
To Reproduce 🔍
Set the ‘aroundRadius’ parameter using the setQueryParameter
function inside searchFunction
definition
Example : https://codesandbox.io/s/43xr3jxk5x
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
infiniteHits showMore() not working after upgrading to V 3.0.2
Hello everyone, I have instantsearch with infiniteHits (algolia magento2 module ver. 3.0.2) implemented on Magento2 and It worked fine ...
Read more >Trigger showMore on infiniteHits widget (Algolia istantsearch.js)
I need to trigger this functionality dinamically, hiding the button, because I want more results on scroll's ending.
Read more >instantsearch.js - UNPKG
n *\n * When querying algolia, the values stored in this attribute will\n ... n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
Read more >@meilisearch/instant-meilisearch - npm package | Snyk
Learn more about @meilisearch/instant-meilisearch: package health score, ... routing: browser URL synchronization, search parameters appear in current URL ...
Read more >React Query Tutorial - 20 - Infinite Queries - YouTube
Your browser can't play this video. Learn more. Switch camera.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
good idea 😃 will give it a try !
Le mer. 5 sept. 2018 16:00, Haroen Viaene notifications@github.com a écrit :
setQueryParameter in the helper resets the page, so if you’re setting it in searchFunction, you need to first get the page, then set the parameter, then reset the page to what it was before. The alternatives suggested don’t have that problem