EnhancedLightningGrid icon indicating copy to clipboard operation
EnhancedLightningGrid copied to clipboard

Selected Rows After Refresh

Open gmandala-akacrm opened this issue 6 years ago • 15 comments

It looks like the internal list of selected rows does not get cleared out after a force:refreshView or sortablegrid:evtRefreshSDG event is fired. The UI makes it look like all of the rows have been deselected, but list actions will receive the ids of previously selected rows.

gmandala-akacrm avatar Dec 27 '18 17:12 gmandala-akacrm

We've noticed the same issue 1.5 years later after this comment. We've resorted to doing a full page refresh (not force:refreshView) after a multi-select event is handled. Is there any chance of this issue getting fixed?

justinclarke-sc avatar Apr 24 '20 15:04 justinclarke-sc

@flindsaysf FYI we recently received a question about this bug on Enhanced Lightning Grid. If you have any advice or have a chance to look into it, please let us know 🙂

tepp0f3l avatar Apr 27 '20 22:04 tepp0f3l

hi, is it possible in general to auto refresh the grid after edit action (e.force:editRecord)? Atm we must do it manually via the refresh button.

stephan-doctari avatar May 11 '20 15:05 stephan-doctari

This would be amazing if we could fix this somehow. Even if there's just a way to force a page refresh after a multi-select button is used would be sooo helpful. Thanks for all your work on this!

scottlandes1217 avatar Jul 14 '20 18:07 scottlandes1217

@tepp0f3l I will literally pay you to fix this bug. Or at least my company would. I started combing through some of the code and I feel like we would just need to update the function of the refresh button on the list to clear any held values. Right now, when you click on the refresh button, it unchecks the multi-select boxes, but still keeps all of the ID's somewhere.

scottlandes1217 avatar Sep 18 '20 19:09 scottlandes1217

Obviously that would never be necessary @scottlandes1217, but if it's truly a tool you use a lot, I will take a look under the hood today. Would you be willing to provide a screenshot, or even better, a basic gif / 10-second screencast?

tepp0f3l avatar Sep 18 '20 21:09 tepp0f3l

Hi @tepp0f3l, Thanks for getting back to me! This is definitely a tool our company utilizes a lot. Here's a screencast of a quick video I took of the issue. https://www.screencast.com/t/E8KNeuPBb2VE

The main problem is that when you select any of the multi-select checkboxes and then use the refresh button on the list, the checkboxes disappear, but they are still checked on the back-end and you can continue to perform actions on them even though they do not look checked.

scottlandes1217 avatar Oct 02 '20 02:10 scottlandes1217

@tepp0f3l Do you think this is possible at all or do you need any more information? If we can’t get this resolved my company is probably going to have to look into alternatives which is going to take a lot of time and money to rebuild. Thanks again for any help!

scottlandes1217 avatar Oct 07 '20 22:10 scottlandes1217

@tepp0f3l - Would it just be possible to add "var idlist = [];" to the reload: function on sdgController.js?

scottlandes1217 avatar Oct 08 '20 00:10 scottlandes1217

I'm very interested in having this bug fixed as well, it's a big pain for our users.

On Wed, Oct 7, 2020 at 8:05 PM Scott Landes [email protected] wrote:

@tepp0f3l https://github.com/tepp0f3l - Would it just be possible to add "var idlist = [];" to the reload: function on sdgController.js?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SalesforceLabs/EnhancedLightningGrid/issues/18#issuecomment-705255535, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIA2SEEJDY3F6WTZ2NC376LSJT63XANCNFSM4GMMFFCA .

--

*Justin Clarke * Salesforce Developer

Direct Line: 416.583.7173 Toll Free: 800.387.3206 x7173

justinclarke-sc avatar Oct 08 '20 12:10 justinclarke-sc

Thanks so much for the screencast @scottlandes1217, that is super helpful. Apologies for not getting back to you sooner (I was out-of-office middle of Oct. and just now revisiting this). I'll do some debugging today!

tepp0f3l avatar Nov 09 '20 20:11 tepp0f3l

@scottlandes1217 So, I haven't yet been able to set up an example like the one you showed in your video (where the delete checkboxes appear). Are you using a custom Sortable Data Grid, or a Relationship?

Any ways, since I'm not able to test the use case, I just went ahead and applied the fix you suggested and created a new package version. I haven't added it to the listing (in case it doesn't work), but you can install it via this link: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t4H000000kbIh

When you have a chance, could you upgrade your package version and let me know if it resolved the issue? If not I will release a patched version ASAP with the fix removed.

tepp0f3l avatar Nov 12 '20 05:11 tepp0f3l

@tepp0f3l - I've experienced the same issue as reported here, and came to a very similar conclusion. I just installed the above reference package, ver 3.38.

Unfortunately, this did not resolve the issue... I've asked one of my developers to look at this and he'll probably post his findings here in the next few days.

ohadios avatar Jan 23 '21 01:01 ohadios

I think the previously recommended fix in the reload function would do nothing but define an empty local array.
Previously recommended: "var idlist = [];"

I believe you would need to set the attribute component.set("v.CheckedRowIDs",[]); or component.set("v.CheckedRowIDs",idlist);

Or however you wish to set an empty list

darrylingalls avatar Jan 28 '21 22:01 darrylingalls

@tepp0f3l any chance to make the above changes and re-package?

ohadios avatar Feb 02 '21 17:02 ohadios

Hi @scottlandes1217, could you please share the screencast again? I'm trying to fix this issue. Thanks

@mcarrilloatsalesforcedotcom this issue was already resolved with the latest version release a while ago.

ohadios avatar Nov 18 '22 17:11 ohadios

@ohadios, cool, thanks