+ Start a Discussion
Shavi DabgotraShavi Dabgotra 

Icon in row actions of lighting- data table in LWC.

Hello experts!
I want an Icon in row actions of lighting- data table in LWC.

User-added imageIcon should be display in red mark. How to add it?

Thank you in advance! 

 

Best Answer chosen by Shavi Dabgotra
CharuDuttCharuDutt
Hii Shavi Dabgotra.
Try The Following Code
import { LightningElement,wire,track,api } from 'lwc';

const actions = [
    { label: 'Edit', name: 'Edit', iconName: 'utility:edit' },
    { label: 'Delete', name: 'Delete' },
];
const columns = [{
//Fields to add in table columns//
];
export default class Datatable extends LightningElement {

Please Mark it As Best Answer If It Helps
Thank you!

All Answers

AbhishekAbhishek (Salesforce Developers) 
https://salesforce.stackexchange.com/questions/310845/how-to-make-the-icon-on-a-data-table-clickable-in-lwc

Your query is answered above.

If it helps mark this as the best answer.
Shavi DabgotraShavi Dabgotra

Hi @Abhishek 

I have a drop down and in drop down I want a icon on the every menu. How to do this?

Thank you in Advance!

CharuDuttCharuDutt
Hii Shavi Dabgotra.
Try The Following Code
import { LightningElement,wire,track,api } from 'lwc';

const actions = [
    { label: 'Edit', name: 'Edit', iconName: 'utility:edit' },
    { label: 'Delete', name: 'Delete' },
];
const columns = [{
//Fields to add in table columns//
];
export default class Datatable extends LightningElement {

Please Mark it As Best Answer If It Helps
Thank you!
This was selected as the best answer
Tanishka AroraTanishka Arora
Can we change the position of icons to left?