I want to create several Panels in a page, where each of these panels have a repeater and data as part of the container elements. I want to be able to collapse and expand these as the user see fit. When I do that now, when the container is collapsed, and expanded again, the repeater and its data are gone. I am hiding elements, so I guess the problem is that the DOM tree elements are not there anymore. I get errors in the Console also, like:
bundle.js:107 Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'dynamicListItems')
at bundle.js:107:111
at onEnter (bundle.js:107:125)
How can I achieve what I want? Do I need to structure my data differently, or is there a way of temporary hiding the data without messing up the DOM?
The problem is not on Page Enter (where I am setting repeater data like shown above), but rather that I want users to be able to click on a panel header after page loads, to then hide/show that panel container with its contents.
So I need some sort of hook into Visibility events or to be able to set on Click events. I have tried both, but I seem unable to set Repeater Data then, for some reason… This is what I try on Click Event (not doing anything based on visibilty or data binding):