Lightning datatable with picklist select powered in Edit Mode

lighning:datatable,picklist inline edit, picklist in lightning datatable

In Lightning:datatable picklist will not list down dropdown values in Inline Edit mode, so i decided to go with modal to show picklist dropdown values for selection in modal Edit mode.

Post deployment Instructions : Once deployed, drag and drop the component to Account record by editing the page in Lightning Mode.

Business use case of this component :

Salesforce end users can have an option of adding contact emails directly from the Account. To do this i created a Lightning component that will be accessible from an account and this component will show ALL contacts related to that Account.

Display fields are First Name,Last Name and Phone as read-only fields and the email and email type (new field) as
editable fields, Also the new custom field “email type” is a picklist field with values: Business, Personal, Other.

Client level Validation : If you enter an email, the email type is mandatory for that contact.

For complete Source Code:

lwc datatable source code :-

 Dynamic picklist with default value selected as radio buttons :-

Click below for, 
Deploy to Salesforce

Be the first to comment

Leave a Reply

Your email address will not be published.