Skip to content

Does hierarchicalMenu categories.lvl0 need to be an array in react-instantsearch v7? #5935

Answered by dhayab
adambremler asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, these are 2 different data structures.

Your dataset (your records) can indeed accept both string and array-based values, for example making one item part of many different hierarchical branches.

The InstantSearch UI state for the hierarchical menu only accepts an array of strings. Here is what a UI state composed of many widgets could look like, for example: https://www.algolia.com/doc/api-reference/widgets/ui-state/js/.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@adambremler
Comment options

Answer selected by adambremler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants