function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Juan GarcíaJuan García 

Lightning datatable - edit column with double click

Hi,

I have a doubt creating a lightning datatable. Can I edit the columns doing double click ?
I only can edit the data clicking to the edit icon. In standard List View, we can edit the value doing double click anywhere in the column.

User-added image

Thanks
Best Answer chosen by Juan García
NagendraNagendra (Salesforce Developers) 
Hi Juan,


As of today lightning:datatable does not allow start inline editing on "double click" of the cell. It only supports inline editing by:

Clicking the pencil icon that appears for an inline editable cell
  • By pressing enter on the cell
  • Below is the excerpt from the documentation:
Working with Inline Editing: When you make a column editable, a pencil icon appears when you hover over the cells in that column. Clicking the icon or pressing the Enter key triggers inline editing.

Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra

All Answers

NagendraNagendra (Salesforce Developers) 
Hi Juan,


As of today lightning:datatable does not allow start inline editing on "double click" of the cell. It only supports inline editing by:

Clicking the pencil icon that appears for an inline editable cell
  • By pressing enter on the cell
  • Below is the excerpt from the documentation:
Working with Inline Editing: When you make a column editable, a pencil icon appears when you hover over the cells in that column. Clicking the icon or pressing the Enter key triggers inline editing.

Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra
This was selected as the best answer
Juan GarcíaJuan García
Hi Nagendra,

Ok, thank you. I will have this limitation in mind
Other question, and style works in datatable?

Regards,
Juan
NagendraNagendra (Salesforce Developers) 
Hi Juan,

Yes, it works.

May I suggest you please refer to below link which might help you further. Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra
Juan GarcíaJuan García
Thanks Nagendra