Expand a single row only

I am trying to figure out how to expand a single row only in an expanding list.
I have set a div to render based on a variable value but it is expanding all of those item in the repeating group.

There is also a bonus at the end, if you bear with me long enough while failing to attempt to hack this with JS.

@aurelie is my second approach flawed, or is it a bug?

Thanks again. You work fast to respond too. Much appreciated. i want to collapse the whole thing so it can’t be seen but i can figure that out from what you have shown me in the video.

You can actually go and bind the [helpMe][item.index] to conditional rendering! Or use it to bind display, whatever works for you :slight_smile:

yep i tried that too. Only issue I have now is that it seems to start with a default value. Either one is expanded or they all are except for one depening on if i put a ! in front of the binding or not

image

ill try the reset variable value as you already suggested. nope that doesnt work

I think you might want to use the value without ! for display, because you want to display it if it’s true right? I’d need to see your data and setup to understand this.

i got it working perfectly. Thanks.

What was the issue? So also the others here can find it and solve it :slight_smile:

I’m pretty sure it was just user error. A hangover from me trying other ways to make it work.

1 Like

Hi @Broberto . i am back to this again and have a small issue with it.
The item index doesn’t seem to work when I have multiple items nested inside others.
See the video at the link below.
The main recipes work fine (blue) but the green and yellow ones seem to expand or collapse multiple items, not just themselves.
I’m happy to add you to the project if required?

https://vimeo.com/manage/videos/886054605

You need to make an object and play with it’s properties.
What you want to do, is save your open “state” as two properties, for example, open and open_ingredients.