LightningFlowComponents icon indicating copy to clipboard operation
LightningFlowComponents copied to clipboard

*Datatable* - _(numberFields)_ - Inline editing number fields clear self out

Open JasonSwan opened this issue 1 year ago • 4 comments

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:

  1. Go to a datatable in a screenflow with a column for a number field.
  2. Click on an empty cell in that column and put in a value
  3. 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 avatar Mar 25 '24 14:03 JasonSwan

@JasonSwan Are you creating new records? What have you defined as the Key Field and is it unique for each record?

ericrsmith35 avatar Apr 07 '24 16:04 ericrsmith35

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.

JasonSwan avatar Apr 09 '24 20:04 JasonSwan

@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.

slhyatt77 avatar May 08 '24 16:05 slhyatt77

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

ericrsmith35 avatar Jun 23 '24 19:06 ericrsmith35