-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(connectToggleRefinement): add support for array values #4420
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 444aa37:
|
Relevant sandbox: https://codesandbox.io/s/instantsearchjs-mp4zs?file=/src/app.js |
I clicked "branch" and "Metra", so got this url: but opening the url won't get Metra selected. |
That's probably since they're on the same attribute, which isn't something we officially support I think. If the widgets are mounted in the other order, the result would be correct. I don't think we can really find a solution for that, except if toggle refinement doesn't remove other refinements in |
You're right. I changed the order of the widgets, and the result is correct. Since it's a "toggle" refinement, I guess the current behavior probably makes sense. We can ship it and later get feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for me this makes sense as a feature, and the code & tests look sound
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. It looks good to me.
Thanks! |
Hi 👋
This PR is a proposal for #2182 which add support for multiples values on
on
/off
for the toggle refinement connector.See #2182 for more information.
Result
It allow us to use the toggle refinement connector with multiple values:
and the toggle refinement widget:
On the playground, I've used:
and you can see it toggle both values.
What do you think?
Thanks!