LightningFlowComponents
LightningFlowComponents copied to clipboard
DataTable - In line Edit - Dates set to null if other columns edited afterwards - Invalid Date {} inserted into editedRows
Steps to reproduce
Steps to reproduce the behavior:
- Go to a datatable with date fields, Save button is not hidden
- Click and edit a Date column, press Save
- Click and edit another column, press Save
Expected behaviour
When multiple saves made to the table, the values displayed in the datatable for Date fields are passed out in the Edited Rows variable of the component.
Actual behaviour
When multiple saves are made to the table, even though valid dates are shown in the datatable, post save, these values are set to null if another edit to another field is made and saved. If the last field you edited and saved was a Date field, that value is kept, but other date values edited earlier are null
Screenshots
This is the screen flow showing the values going that are being set in the table, with the logs appended shown to highlight the console.log outputs that highlight the error.

I added a console.log statement in the handleSave method around lines 1400-1500 of datatable.js to see the three unique saves to data in order (Start Date, End Date, and then finally Tags), as well as output the values for mydata and editedRows.
You can see that when the value gets updated in the arrays properly for the first edit to Start Date, but the second edit for End Date, somehow the Start Date now becomes an Invalid Date {}.
I notice that some times the date is a string - Start_Date__c: "2003-07-01" and then later it is a Date type - Start_Date__c: Tue Jul 01 2003 10:00:00 GMT-0600 (Mexican Pacific Daylight Time) {}. Perhaps there is a data type mismatch that may be relevant to issue?
Debug Logs
This has been resolved in v4.0.9