Does hierarchicalMenu categories.lvl0 need to be an array in react-instantsearch v7? #5935
-
In the docs (link) it seems like But when attempting to set the state with Is this true? Appreciate any help! :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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/. |
Beta Was this translation helpful? Give feedback.
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/.