has anyone done cascading lists (or is it even possible)?
I have a bunch of topics (text objects) organised in chapter, sub-chapter, and then the topic. Ideally I would first like to display the list of chapters. When selecting a chapter the associated sub-chapter should open as a list underneath. And finally when selecting a sub-chapter the associated topics list underneath.
Basically it should work exactly like the selecting a topic in the weweb documentation.
I am using Xano as the backend. Currently I have a db table for each level (chapter, sub-chapter, topic). Fetching the data is done via Xano add-ons so I get all the data in one json. It’s less than 100 topics so I think it should be ok.
In the meantime I have created cascading containers. When selecting a chapter I update a variable with the chapter id from Xano. The sub-container has a conditional rendering where I test if the variable equals the parent Xano id of the sub-chapter.
That way only one sub-chapter can be opened. Which is ok for my case.
But, is there a way to attach a variable or state to each instance of the container (or something else) in the list? That way multiple chapters could be opened at the same time.