You need to sign in to do that
Don't have an account?
suri03081988
Work around for dropdown in <lightening:datatable
Hi All,
My requirement is to select a status field from the dropdown option in <Lightening:datatable
sample code is
Component Sample code:
<lightning:datatable
columns="{!v.fu_columns }"
class= "table-test"
data="{!v.data }"
keyField="Id"
hideCheckboxColumn="true"
draftValues="{! v.draftValues }"
onsave="{! c.handleSaveEdition }"
onrowaction="{!c.selectDropDown}"
/>
JS controller:
init : function(component, event, helper){
component.set('v.fu_columns', [
{label:'User Description', fieldName:'Description__c', type:'Text',editable: true},
{type: 'button', typeAttributes: {
label: 'Select',
name: 'Select',
title: 'Select',
disabled: false,
}}
]);
}
selectDropDown : function(component, event, helper){
var recId = event.getParam('row').Id;
var actionName = event.getParam('action').name;
if ( actionName == 'Select' ) {
alert('==Select');
>> Please guide some sample code to open a popup and select one value for status and that will updated in backend
}
},
THanks in advance
My requirement is to select a status field from the dropdown option in <Lightening:datatable
sample code is
Component Sample code:
<lightning:datatable
columns="{!v.fu_columns }"
class= "table-test"
data="{!v.data }"
keyField="Id"
hideCheckboxColumn="true"
draftValues="{! v.draftValues }"
onsave="{! c.handleSaveEdition }"
onrowaction="{!c.selectDropDown}"
/>
JS controller:
init : function(component, event, helper){
component.set('v.fu_columns', [
{label:'User Description', fieldName:'Description__c', type:'Text',editable: true},
{type: 'button', typeAttributes: {
label: 'Select',
name: 'Select',
title: 'Select',
disabled: false,
}}
]);
}
selectDropDown : function(component, event, helper){
var recId = event.getParam('row').Id;
var actionName = event.getParam('action').name;
if ( actionName == 'Select' ) {
alert('==Select');
>> Please guide some sample code to open a popup and select one value for status and that will updated in backend
}
},
THanks in advance
This blog will help you to set up the modal/popup :-
https://www.sfdcpoint.com/salesforce/modal-popup-lightning-component-salesforce/
Kindly mark it as the best answer if it works for you.
Thanks & Regards,
Priya Ranjan