LightningFlowComponents icon indicating copy to clipboard operation
LightningFlowComponents copied to clipboard

Table edit issue Datatable Version #3.4.3

Open fefris opened this issue 2 years ago • 21 comments

Seeing an issue when editing table entries.

Edit the entry and the second you click out of the field it reverts to the old value HOWEVER if you then do an update as part of your flow it updates with the values you entered. So its a display bug where although you have edited the table cell it shows the old value.

In version 3.3.2 this did not happen and any entry in a table cell stayed as the entered value after the table save button was pressed.

Also note i have v 3.4.3 installed but the version number inside the component in the flow states 3.3.2 below the key field box.

Before Editing before edit

Mid Edit mid edit

After Save pressed

after save pressed

After Record update (and loop back to display collection)

after record update

fefris avatar Feb 16 '22 01:02 fefris

@fefris Please try the latest version 3.4.5 and let me know if you are still having this issue. https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5G000003rUrOQAU

ericrsmith35 avatar Feb 17 '22 20:02 ericrsmith35

Hi @ericrsmith35,

I noticed the same behavior as reported by fefris on version 3.4.5 with Checkbox and Text fields : when leaving the field with TAB or ENTER, or by clicking on another field, the field orginal value is restored.

Picklist fields are OK and keep their local values (although only the last picklist field changed is up-to-date in the OutputEditedRows collection but I will raise a specific issue for this one).

The component has the "Hide Cancel/Save button" checkbox unchecked.

Here is a screen recording of the issue : Video capture

sylvain-priser avatar Feb 22 '22 18:02 sylvain-priser

@ericrsmith35 same issue with 3.4.5 installed as per your link

fefris avatar Feb 24 '22 01:02 fefris

I am still not able to reproduce this issue

https://user-images.githubusercontent.com/24724447/155890246-e9c7ae0d-27ba-432d-a6d5-1caf8859a1b0.mp4

.

ericrsmith35 avatar Feb 27 '22 16:02 ericrsmith35

Hi @ericrsmith35 ,

Thanks for your answer, I think I have found why it does not behave the same.

I just noticed that my Datatable component was embedded in a Section component. I removed the section and the Datatable works fine now ! Maybe it will need a new line in Troubleshooting & Restrictions...

By the way, this component is great, thank you for your work Eric & contributors !

FYI @fefris

sylvain-priser avatar Feb 28 '22 00:02 sylvain-priser

I have an open Case with Salesforce to find out why a Section component on a screen causes a change in how the Datatable behaves.

ericrsmith35 avatar Mar 05 '22 22:03 ericrsmith35

Hi @ericrsmith35

I had v3.4.5 installed and ran into this issue where tabbing out of an edited cell in the datatable caused that cell to revert back to its previous value (in this scenario, back to null). I do have a section component on the same screen as my datatable, but the datatable is not inside of that section component.

I noticed we did not experience this issue on v3.3.2 (which was still installed in one of the connected sandboxes for this client), so I was able to patch this bug by reverting the "_tableData" attribute back to the "tableData" attribute in the datatable.js file. I can't pinpoint exactly why this fixed the issue, but I wanted to pass along this information in case it helps with your investigation. Attached is my working version of datatable.js - a hybrid of v3.3.2 and v3.4.5

datatable.txt

RealEvanPonter avatar Mar 08 '22 19:03 RealEvanPonter

FYI @alexed1 - Can this extra refresh be avoided in the Datatable code or does something internally have to change around how Sections are handled?

@RealEvanPonter The switch to _tableData is in preparation to supporting a future flow enhancement where components can be reactive to other components on the same screen. It looks like having a Section on a screen unnecessarily triggers a table refresh when inline edits are made to the table.

ericrsmith35 avatar Mar 12 '22 20:03 ericrsmith35

I'm on v3.4.5 and experiencing the same issue. It does seem to be somehow related to if there is a section in the screen or not. However, it doesn't matter if the datatable itself is in the section or not.

Section exist in the screen, but datatable is outside of section: 2022-03-16_12-59-25 (1)

All sections removed from the screen: 2022-03-16_13-04-41 (1)

kdoruibin avatar Mar 16 '22 12:03 kdoruibin

I am experiencing this issue as well. Like @kdoruibin said, it doesn't matter if the datatable is inside of the section, only if the section is on the same screen. Are there any solutions available yet other than removing all sections from the flow screen?

ChewinChaz avatar Aug 08 '22 18:08 ChewinChaz

Also, this error randomly crops up when inline editing tables with a section on the screen. It seems to be related somehow

image

ChewinChaz avatar Aug 08 '22 18:08 ChewinChaz

@adwhite75 are you aware of any issues with custom components in sections?

@ericrsmith35 if you can set this up in an org with some credentials and a simple repro, we can try to get someone to investigate.

alexed1 avatar Aug 09 '22 03:08 alexed1

Yes, but I believe @ericrsmith35 had fixed those issues already.

adwhite75 avatar Aug 09 '22 13:08 adwhite75

@ChewinChaz & @kdoruibin What version of the component are you each running? As @adwhite75 said, this should have been addressed in the more recent releases.

ericrsmith35 avatar Aug 09 '22 14:08 ericrsmith35

@ericrsmith35 4.0.8

ChewinChaz avatar Aug 09 '22 20:08 ChewinChaz

Having a lot of users getting this [t[e].slice is not a function] error lately (see screenshot above). Has anyone else reported this issue or figured out a way to resolve it? Thanks @ericrsmith35!

ChewinChaz avatar Aug 19 '22 19:08 ChewinChaz

@ChewinChaz Do you still get this in 4.0.11?

ericrsmith35 avatar Sep 11 '22 16:09 ericrsmith35

@ericrsmith35 I installed 4.0.11 on Monday and a user just sent me this screenshot

image

This is the first time I've seen this error on a screen that does not also use a section component so the two may not be related after all

ChewinChaz avatar Sep 14 '22 17:09 ChewinChaz

This will be fixed in the next release (v4.0.12)

ericrsmith35 avatar Sep 17 '22 15:09 ericrsmith35

It seems to only happen when one is editing a Date field and another Date field has custom Type attributes

ericrsmith35 avatar Sep 17 '22 15:09 ericrsmith35

Evan,

I have a case open with Salesforce to try and find out why Sections are causing a change in behavior.

Eric Smith

On Tue, Mar 8, 2022 at 2:35 PM Evan Ponter @.***> wrote:

Hi @ericrsmith35 https://github.com/ericrsmith35

I had v3.4.5 installed and ran into this issue where tabbing out of an edited cell in the datatable caused that cell to revert back to its previous value (in this scenario, back to null). I do have a section component on the same screen as my datatable, but the datatable is not inside of that section component.

I noticed we did not experience this issue on v3.3.2 (which was still installed in one of the connected sandboxes for this client), so I was able to patch this bug by reverting the "_tableData" attribute back to the "tableData" attribute in the datatable.js file. I can't pinpoint exactly why this fixed the issue, but I wanted to pass along this information in case it helps with your investigation. Attached is my working version of datatable.js - a hybrid of v3.3.2 and v3.4.5

datatable.txt https://github.com/alexed1/LightningFlowComponents/files/8209107/datatable.txt

— Reply to this email directly, view it on GitHub https://github.com/alexed1/LightningFlowComponents/issues/1050#issuecomment-1062131720, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4UHX5XXTYSS6SIFY6HSSDU66TYZANCNFSM5OQGE54A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

ericrsmith35 avatar Oct 11 '22 07:10 ericrsmith35

This has been resolved in version 4.0.12. https://unofficialsf.com/datatable-lightning-web-component-for-flow-screens-2/#Installation

ericrsmith35 avatar Nov 03 '22 00:11 ericrsmith35