Is it possible to add a value on href? so I can do something like this:
html:
<a href value={obj.Id} onclick={openRecord}> </a>
js:
openRecord(event){
this[NavigationMixin.Navigate]({
type: "standard__recordPage",
attributes: {
recordId: event.target.value,
objectApiName: 'Custom_Object__c',
actionName: 'view'
}
});
}
I tried to console.log the event.target.value inside openRecord method but it doesn't show any. Is there any workaround for this?