+ Start a Discussion
chim chim 9chim chim 9 

How to save new record in draft only in lightning datatable when save button is clicked? Please help me asap

Satish InugantiSatish Inuganti
Hi Chim,

<lightning-datatable key-field="id" data={data} columns={columns} onsave={handleSave}> </lightning-datatable>

onsave(). Try for event.preventdefault() which prevents the default action and store your draft values in client side variable. I hope this will solve your problem.

Satish Inuganti.