I have requirement to show edit and delete button in single row rather than two different rows in lightning datatable of lwc.
Currently it is displaying as shown below
Instead of this want to display under one column like Action and have those buttons next to each other.
Also I dont want them in as shown below as it will result in increase in number of clicks
How can I achieve it?
Below is the code snippet for current scenario been showing up
{
label:'Edit',
type:"button-icon",
typeAttributes:{
name:'Edit',
title:'Edit',
iconName:'utility:edit'
}
},
{
label:'Delete',
type:"button-icon",
typeAttributes:{
name:'Delete',
title:'Delete',
iconName:'utility:delete',
iconClass:'slds-icon-text-error'
}
}