I have simple datattable where i am displaying couple of columns ,on click of any row in datatable i need to get the value from Name column to JS for further processing
<template>
<lightning-datatable
data={data}
columns={columns}
key-field="id"
onrowselection={getNameRowData}>
</lightning-datatable>
JS -
getNameRowData(event) {
const selectedRows = event.detail.selectedRows;
console.log('selectedRows>>'+selectedRows);
}
but i am not able to see any logs printing in console.Please help i dont want checkbox ,just when i click on any row then that perticular opp Name needs to get in JS