I can't find how this is implemented:
I'm using a lightning-datatable and would like to convert my current button-icon to what the triangle/square icon above. when clicked it would show two options: edit and delete that would need to call a js function. I want to replace this guy (utility-edit) pencil which calls an edit handlerowaction method currently. I'm looking to have two options available in a dropdown to call edit and delete handlers with the triangle in a box option.
js columns:
const SAColumns = [
{
type: 'button-icon',
fixedWidth: 40,
typeAttributes: {
iconName: 'utility:edit',
name: 'edit',
title: 'Edit',
variant: 'bare',
alternativeText: 'edit',
disabled: false
}
},
{label: 'Title', fieldName: 'Title__c', type: 'pickList'},
{label: 'User', fieldName: 'UserName', Id: 'User__c',type: 'text'}
];
html datatable:
<template if:true={hasSAs}>
<lightning-datatable
data={datatableSAs}
columns={SAColumns}
key-field="Id"
onrowaction={handleRowAction}
hide-checkbox-column="true"
sorted-by={sortBy}
sorted-direction={sortDirection}
onsort={handleSortdata}
>
</lightning-datatable>
</template>