You need to sign in to do that
Don't have an account?
Pubali Banerjee 2
how to pass the entire row of a datatable after inline editing from lwc js to apex controller method instead of just the draft values
I have 3 columns : My target, account id and territory name in datatable. Out of which account id is the key field and My target is editable. Now as we know draft value contains only the id and edited field. But i need to pass the territory name as well to the controller method instead of just the draft value. Right now, my handlesave () code contains only:
var draftValuesStr = JSON.stringify(event.detail.draftValues);
await updateTSF( { draftValueStr: draftValuesStr } ).then( result => {
console.log( JSON.stringify( "Apex update result: " + result ) );
updateTSF is the controller method. draftvaluestring only contains :{id:xxxx , mytarget: yyyy}
Is there any way i can store all the 3 values in an array and then send this array to the controller?
var draftValuesStr = JSON.stringify(event.detail.draftValues);
await updateTSF( { draftValueStr: draftValuesStr } ).then( result => {
console.log( JSON.stringify( "Apex update result: " + result ) );
updateTSF is the controller method. draftvaluestring only contains :{id:xxxx , mytarget: yyyy}
Is there any way i can store all the 3 values in an array and then send this array to the controller?