hierarchicalMenu checkbox option #5204
Replies: 25 comments
-
Hi @ryanmitchell thanks for taking the time to open this issue. Can you give more details about the behaviour that you expect beyond having checkboxes? Would you like to be able to select multiple items in the hierarchy? |
Beta Was this translation helpful? Give feedback.
-
Hello
Yes it would need to be able to multi-select. Effectively we are trying to do a refinementList but with a hierarchy, allowing us to have grouped lists for refinement rather than one big list.
… On 8 Dec 2016, at 13:20, Alex S ***@***.***> wrote:
Hi @ryanmitchell <https://github.com/ryanmitchell> thanks for taking the time to open this issue. Can you give more details about the behaviour that you expect beyond having checkboxes? Would you like to be able to select multiple items in the hierarchy?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1658 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AADKu5mn_vkv4jYhM0678aYi8QvqqSslks5rGAQ3gaJpZM4LEAPw>.
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the details, @ryanmitchell It is not possible as for now. |
Beta Was this translation helpful? Give feedback.
-
No problem - if I was to work on it would it be of interest to you as a PR?
… On 8 Dec 2016, at 16:10, Alex S ***@***.***> wrote:
Thanks for the details, @ryanmitchell <https://github.com/ryanmitchell> It is not possible as for now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1658 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AADKuzlLhsqro5U2TLpHRdk8BqXSz3Pgks5rGCvrgaJpZM4LEAPw>.
|
Beta Was this translation helpful? Give feedback.
-
@bobylito Just one further question - is there any way of getting the complete hierarchy with the number of results per item? Currently I can only get the main root plus the level i've refined to, but ideally I'd like to be able to get everything. Otherwise its back to the drawing board. |
Beta Was this translation helpful? Give feedback.
-
Do you mean you would want to show the hierarchical menu with every menu item opened showing the whole tree at start? |
Beta Was this translation helpful? Give feedback.
-
I know this is an older ticket but I would like to know if it's possible to do that last suggestion: show the full tree at the beginning rather than having to click down to see the lower levels. |
Beta Was this translation helpful? Give feedback.
-
Hey @hereswhatidid, that information is actually not readily available at initial rendering, because each of the lower levels would have to do another query. For that reason an “opened” hierarchicalMenu isn’t simply possible. A disjunctive (multiple items checked possible) might be possible however, but as discussed in #2053, this needs a lower level solution in the helper. Feel free to give it a try though! |
Beta Was this translation helpful? Give feedback.
-
Gotcha, thanks! |
Beta Was this translation helpful? Give feedback.
-
Closing in favour of #2053 |
Beta Was this translation helpful? Give feedback.
-
never mind, this is the only issue open on disjunctive hierarchicalMenu (aka hierarchicalRefinementList) for is.js |
Beta Was this translation helpful? Give feedback.
-
@ryanmitchell - Were you able to come up with a way to do this? Basically I need an instantSearch widget as you described. One that allows the user to make multiple selections. For example, if a hierarchy is States and the cities in those states, the user wants to be able to select multiple cities. The hit container would then display those items that have all the cities ANDed together. One modification I have been attempting to do is I am trying to see if each time I click on on item in the hierarchicalMenu it would just keep adding to the refinement list instead of the current behaviour where the next one I click removes the previous refinement. Any advice you or anyone has would be appreciated. |
Beta Was this translation helpful? Give feedback.
-
I ended up storing the list of categories in a normal SQL database and then outputting that aspect outside of instantsearch, with an onchange event in JS to update instantsearch results.
… On 2 Jun 2017, at 00:58, slimtimbodin ***@***.***> wrote:
@ryanmitchell <https://github.com/ryanmitchell> - Were you able to come up with a way to do this? Basically I need an instantSearch widget as you described. One that allows the user to make multiple selections.
For example, if a hierarchy is States and the cities in those states, the user wants to be able to select multiple cities. The hit container would then display those items that have all the cities ANDed together.
One modification I have been attempting to do is I am trying to see if each time I click on on item in the hierarchicalMenu it would just keep adding to the refinement list instead of the current behaviour where the next one I click removes the previous refinement.
Any advice you or anyone has would be appreciated.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1658 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AADKu_0hziJkKY8Svvyd7i8YU0r7tcQAks5r_1AcgaJpZM4LEAPw>.
|
Beta Was this translation helpful? Give feedback.
-
+1 I’ve ended up here a few times now. This seems to be a search paradigm that we keep coming across. |
Beta Was this translation helpful? Give feedback.
-
@joshuabaker, feel free to upvote the original issue 😄 |
Beta Was this translation helpful? Give feedback.
-
@ryanmitchell I have the same issue - is there any chance that you could share some of your code and save me from reinventing the wheel? |
Beta Was this translation helpful? Give feedback.
-
@piersb - nothing to share really. We just output the refinements using SQL and then using an on change event added or removed them from the refinement list. Pretty simple stuff. |
Beta Was this translation helpful? Give feedback.
-
I have faced the same issue. Basically, In my application, an Entity can have multiple categories. So for searching through these categories, I need to implement multiple category selection features. Is there a way to do this? |
Beta Was this translation helpful? Give feedback.
-
For now there's no way to do this in the Algolia backend. A solution could be found by combining refinement lists to make a new kind of hierarchical refinement instead |
Beta Was this translation helpful? Give feedback.
-
One problem I am facing here. I have indexed the category details in agolia. But I am not able to form the hierarchical menu on the frontend My data set isConfig |
Beta Was this translation helpful? Give feedback.
-
@sandipbhuyan Is your problem related to the checkbox issue? Or is it a general enquiry on how to user the hierarchical menu? |
Beta Was this translation helpful? Give feedback.
-
I've written a little custom version of the menu that could probably be extended into this functionality. Dropping it here now, might pick it up further myself later. https://gist.github.com/jasperkennis/977b2638068082800a473473d6d48222 |
Beta Was this translation helpful? Give feedback.
-
You have my vote as well. Is there any workarounds for the original request: multi-select with checkboxes? |
Beta Was this translation helpful? Give feedback.
-
I don't see a solution that plays nice with the intended usage of instantsearch, or even the actual search logic of Algolia. So far, the only solution I can come up with is the following (and I don't feel like programming this...). I think you could clone your entire instantseach intance when a user wants to filter for more then one hierarchical attribute, so you end up with several queries ran paralel. The results should then be combined through some kind of merge, rendering the result with some abstraction of the "normal" widgets. |
Beta Was this translation helpful? Give feedback.
-
Feature request
Is there any way to have a hierarchicalMenu that shows the lowest level children as a checkbox list rather than a link list, in the same way that a refinement list works? Maybe this is already possible, but I've had a look and a search and can't come across a way of doing it.
Even if you could offer some pointers in how to go about it, I should be able to write the code myself.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions