I am using two RefinementList components that search on two separate facets positions_primary and positions_sub, and I want to change those to connectRefinementList components that source a local dataset for the search facets.
My facets have a many-to-many relationship. My thinking is that the only way to be able the select the first facet value and control the second facet value, such that it only displays those facet values associated with the first selected value is to use connectRefinementList (PositionList.js) to source a local data object for an array relating to the “positions_primary” facet, and then the second connectRefinementList (SubList.js) show a rarified list of positions_sub facet options by the selection first made in the PositionList.js component.
So far my implementation isn’t working and I am not sure why.
Here’s the basic codebase:
I believe I am importing my data correctly but I’d like to get some better eyes on this before I spin my wheels much longer.
Help is much appreciated!