I'm using a for:each directive to render my data table. I'm also utilizing lightning-input to fire my onChange events and fetch the elements for that particular row.
Long story short, whenever I fire the onChange event, the event targets the very first row instead of its own:
I checked, and my event.target.dataset as it turns out returns undefined. Records already saved in the database are unaffected, but new rows created and aren't saved yet are. If such, what would be an alternative to event.target.dataset? How exactly can one correct this?
I need to keep it on the onChange event, so no row selections (currentTarget), sadly.
I made this playground, which I hope would better explain the issue I'm facing. The code in the playground's simplified but shows pretty much the same problem.
Thanks in advance!