Hello Wix Experts,
I have got a repeater connected with database. I have implemented search function and it shows one result upon clicking find/search button (I have set up to show only one for this). I have a load more button outside the repeater to load more results, and it works perfectly fine.
Here, I have a html component and inside each repeater container, I have a button "Preview" to show the invoice in repeater. Preview button is not connected to any elements in the database itself. The problem here I am facing is once I click on load button, assume I got 2 results in two repeater and when I click on the preview button, only the url or item data gets extracted from the latest one even though I click on the preview button of first repeater.
I tried using both onItemReady and foreachItem with the repeater but no luck at all. I think it's something to do with indexing but have no idea in implementing this. I have attached a screenshot of the code here under.
When the page loads, and clicking preview button shows the invoice in html component as expected.
My problem: Even if I click on preview button of first result, it still shows the invoice from the second result. How could I change it so that I can get the corresponding invoices preview in html component?
Thank you for your help!