Dynamic Collapse inside of a repeat

How would I put a dynamic collapse inside of a repeat and use the mouse over command to show it? I have tried using dmx-bind:id but when I call it in the browser I get an error that the property is not defined. Below is what is not working:
The collapse:
class=“collapse” dmx-bind:id=“collapse_{{$index}}” is=“dmx-bs4-collapse”
The call to show:
section dmx-on:mouseenter=“MainLayout.collapseCommentsList.collapse_{{$index}}.show()”
The Browser Error:
on.js:13 Error executing “MainLayout.collapseCommentsList.collapse_1.show()” TypeError: Cannot read property ‘collapse_1’ of undefined

Thanks in advance for your help.

The error means that there is no element collapse_1 in the path you have given.
Try rechecking MainLayout.collapseCommentsList if these two names are correct.

Also, just to be sure, you can also try this command on browser’s dev tools console:
dmx.app.data.MainLayout.collapseCommentsList to make sure this actually exists.

1 Like

Edward, were you able to get this to work? I too am trying something very similar. It would be great to understand what you finally did to remedy your situation. Thanks!