I have a doubt in LWC.
Can we declare a dynamic id inside template for:each
For the dynamic value, I used the data-set, and using the onclick event got the data-set value. Since I have multiple HTML elements, is there a way to add text.
Something Like this {rec.id+'-bttn'}
the requirement is I have multiple buttons that are displayed based on the records. I need to open the records by clicking the button lightning icon. Once the record is opened I need to change the icon of the button. For that, I need dynamic Id which should like {rec.id+'-bttn'}
and {rec.id+'-attachment'}