*Datatable* - _(numberFields)_ - Inline editing number fields clear self out
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
Steps to reproduce the behavior:
- Go to a datatable in a screenflow with a column for a number field.
- Click on an empty cell in that column and put in a value
- Click on another cell in the datatable.
Expected behaviour
The inputted value should appear in the edited cell.
Actual behaviour
The inputted value disappears, while the cell remains highlighted yellow.
Screenshots
If applicable, add screenshots to help explain your problem.
https://github.com/alexed1/LightningFlowComponents/assets/37820464/e6f1c1fc-2df0-4cb5-9251-efca84cba4b7
@JasonSwan Are you creating new records? What have you defined as the Key Field and is it unique for each record?
Yes, I am creating new records. I am using the ID field as the key field for the datatable. Each record is given a 'proxy' ID like a1Y000000000001AAA, a1Y000000000002AAA, a1Y000000000003AAA, etc.
@ericrsmith35 I am having the same issue but I am not creating new records. I have a collection of existing records. I am allowing a number column for Edit. The value is blank by default. The user clicks the pencil. They enter a number. They click off the field into and their entry is cleared but the field shows yellow as if it accepted a change. They have to click back in, then it will hold the value entered the second time.
Based on my testing, I think this is a bug in the base Salesforce Datatable component. Pressing the Enter key instead of clicking out of the cell does retain the entered value the first time the cell is edited however.
The handlleCellChange event.detail returned by Salesforce does return a value of null when editing an empty number field for the first time in a datatable. The event.detail does return the entered value the second time the field is edited and clicked out of or if the Enter key was used the first time.
FYI @alexed1 @adwhite75