instantsearch
instantsearch copied to clipboard
Let `refine` accept undefined to remove a selected value
When implementing a connector like menu it's hard to know what to do to remove a value. The refine is implemented like a toggle but it's not obvious. If we could give a specific value to refine
that would help a lot documentation-wise and implementation-wise (no need to store the value).
Impacted connectors:
- [ ] menu
- [ ] hierarchicalMenu
- [ ] refinementList
- [ ] hitsPerPage (this one could work but we'd need to document it)
- [ ] numericRefinementList
- [ ] numericSelector
Like React InstantSearch, the refinement value in a refinement list could accept the whole list to apply. This way you can easily select multiple values.