I have a Lightning Component that displays a lightning:dataTable of custom object records. Displayed fields include Name, Amount, and Date. I need the fields to be editable, but dataTable's inline editing feature doesn't support the date datatype. So instead, I've added a column with an edit button that calls the editPayment function.
editPayment: function(cmp)
{
var editRecordEvent = $A.get("e.force:editRecord");
editRecordEvent.setParams({
"recordId": cmp.get("v.recordId")
});
editRecordEvent.fire();
},
That pops open the edit modal and everything is cool. But... after the record is edited, I need to load the edited data for my dataTable. My question: how do I know when the edit has been completed? Is there a way to setup a callback? Is the modal event in communications with the component that birthed it?
Update: actually, the Callback thing hadn't occurred to me until I got to the end of writing that post. After posting, I searched on editRecord callback and found some other threads -- looks like others have had the same issue.
https://success.salesforce.com/ideaView?id=0873A000000CQQiQAO
and
Callback event on $A.get('e.force:editRecord') in lightning
It's some consolation to know I'm not alone on this, but neither of these threads had an answer...
What about... browser focus? After the modal closes, could I detect that browser focus has returned to my component?