Closed jryd closed 1 year ago
Thanks for the detailed report. Unfortunately this is a bug in InstantSearch.js (underlying library), but luckily it has been fixed in the next major version of that library. Seeing as show more and searchable can't work at the same time, what do you think would be the best solution?
disabled
if user is currently refining by querySeeing as you're using the main slot, you can already choose not to render or make the button disable based on the isFromSearch
variable.
What are your thoughts?
See also original PR and issues in InstantSearch:
Thanks for the update @Haroenv.
Given the two do not work together at all, in any capacity, if you are using both then one shouldn't be visible in my opinion.
I would go for a slightly different solution to those that you proposed:
If the user is using show-more and searchable then I would default to using searchable, not render the show more slot, and trigger a console warning with a short explanation of the bug and a link to this issue or the original algolia/instantsearch.js#3064 issue.
This has been released since :)
Bug 🐞
What is the current behavior?
I have a refinement list that is searchable and has the ability to show more:
When the page loads, if you do not enter anything into the search box and click 'Show More' it works perfectly - I can show more or less at will. As soon as I enter any text into the search box, however, the 'Show More' button will stop working. Even if I remove all text from the search box, it still will not work.
Make a sandbox with the current behavior
Template: https://codesandbox.io/s/github/algolia/create-instantsearch-app/tree/templates/vue-instantsearch
The sandbox environment does not work for me as I am using the V2 Beta. I have made a short video though - https://imgur.com/a/MBejem8
Full code that is in use to create this:
What is the expected behavior?
I should be able to click 'Show More' and see other results matching the search parameters.
Does this happen only in specific situations?
Only once you enter some text into the search box.
What is the proposed solution?
Clicking 'Show More' will show more results based on text entered into the search box.
What is the version you are using?
2.0.0-beta.1