0

I am using lightning:datatable to display data and it has the ability to inline edit. I was wondering if there's some sort of event handler when a cell is being edited (when the user clicks the pencil icon on the table cell for inline edit)?

The reason I asked is I would like to disable a button outside of the datable during an inline edit. I looked through the lightning:datatable documentation but no luck.

Thanks in Advance

1
0

You can use oncellchange here.

From documentation (emphasis mine):

You can handle the oncancel, oncellchange, and onsave actions when the cell value changes or is saved.

1
  • I'm having this problem now. The oncellchange event - certainly in LWC anyway - only fires when the user blurs away from the edit, ie they click on something other than the input field after making a change. Does anyone know if we can capture an event when the user actually clicks the pencil icon, or as soon as they type a change? – ministe2003 Dec 17 '20 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.