In each row of the lightning datatable, I have a button. I want to replace the button with a lightning badge when an user clicks on the button. I wonder, how to implement this?
JS
@track COLUMNS = [
{
label: "Name",
type: "text",
},
{
label: "Accept",
type: "button",
typeAttributes: {
label: "Accept",
name: "buttonName",
variant: "brand"
}
}
];
export default class MiscRecord extends LightningElement{
@recordId;
@wire(getData, {recordId: '$recordId'})
Data;
handleRowAction(event) {
}
}