-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MPDX-8240] Deselect removed ids #1151
Conversation
Preview branch generated at https://8240-deselect-removed-ids.d3dytjb8adxkk5.amplifyapp.com |
Bundle sizes [mpdx-react]Compared against 6c3cb0b No significant changes found |
c087672
to
efdc2ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code and UI look great! On the first test, it removed all of my selected tasks, but on the second test it worked as described. - It also did this on contacts.
@dr-bizz Good catch! That should be fixed now, as well as a performance improvement. Instead of waiting for the contacts or tasks to load before loading the mass selection ids, we load the mass selection ids immediately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works well in the UI, and the code looks great. I didn't know you could fetch previousData. At first I was worried that if no tasks are present, it would default back to the previousData, but that isn't the case.
This change is for consistency and also so that you can modify the selected ids multiple times during the same render and get the expected results.
Also speeds up loading mass selection ids by not waiting for the contacts or tasks to load first.
dfee5c4
to
6e9c8e4
Compare
Description
When the list of contacts, tasks, or other entities changes, deselect any that were removed from the list.
Testing
MPDX-8240
Checklist: