You need to sign in to do that
Don't have an account?
Simmo
Can you add a picklist to an aura datatable?
Is there any way of displaying a picklist within an aura datatable?
I've read that only certain data types can be used within a datatable, but there must be a way of displaying a picklist or something similar where the user can select a value from a list of values?
Anybody managed to do this?
I've read that only certain data types can be used within a datatable, but there must be a way of displaying a picklist or something similar where the user can select a value from a list of values?
Anybody managed to do this?
Greetings to you!
As of now, we can not do that. There's an idea that is active on the success community with a similar discussion for which you can upvote so that it gets available in the future.
https://success.salesforce.com/ideaView?id=0873A000000PZJ4QAO
As an alternative, you would need to implement a custom HTML data table if you wanted to have this feature available.
Or You can change the type of the picklist column from the picklist to button. On button press, open a modal that fetches and displays the picklist values.
Please refer to the below links which might help you further with the above requirement.
http://www.sfdcpanda.com/lightning-datatable-with-picklist-select-powered-in-edit-mode/
https://github.com/dineshdk/lightning-datatable-with-picklist-select-powered-in-Edit-Mode
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
All Answers
Greetings to you!
As of now, we can not do that. There's an idea that is active on the success community with a similar discussion for which you can upvote so that it gets available in the future.
https://success.salesforce.com/ideaView?id=0873A000000PZJ4QAO
As an alternative, you would need to implement a custom HTML data table if you wanted to have this feature available.
Or You can change the type of the picklist column from the picklist to button. On button press, open a modal that fetches and displays the picklist values.
Please refer to the below links which might help you further with the above requirement.
http://www.sfdcpanda.com/lightning-datatable-with-picklist-select-powered-in-edit-mode/
https://github.com/dineshdk/lightning-datatable-with-picklist-select-powered-in-Edit-Mode
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
In the below example, I’m retrieving the “Account” object “Industry” picklist values and populating on the lightning component using ui:inputSelect.
Apex:
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com
Thank you for the code snippets, I will give this a try and get back to you to let you know if it worked for me.
Jon
Thank you for the links, I will have a read and see if it helps.
Jon
https://www.playg.app/play/picklist-in-lightning-datatable-aura
hi simmo
how did you create the html table to solve the issue?
can i have that code please???