I have a dataset connected to a repeater. It isn't providing the right item with onClick() and getCurrentItem(). It always seems to be giving the first item in the displayed repeater from the dataset. Any ideas why? I have used similar code another website, and it works.
top of page
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
bottom of page
The first thing that jumps out at me is that you're assigning a variable with a $, I would just use `let item = event.context` and then change the other instances of `$item` to just `item`. Does that help anything?
Rob
Thank you, Rob. I was able to get it working!
The above code is what gives me the first record of the repeater.
It won't keep the name of my button when I past in the code. But my button name is named in actual code.
Hello from the Wix DevRel Team!
I'm not sure why this isn't working, but the fact that it's displaying the first item in the repeater makes me think that you're on the right track. How do you have the onClick() function set up? Can you provide your code here?
Thanks
Rob