-
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
Appeals - Remove appeals when switch account list #1196
Conversation
Preview branch generated at https://fix-appeal-not-changing-on-account-switch.d3dytjb8adxkk5.amplifyapp.com |
Bundle sizes [mpdx-react]Compared against 95a5eae No significant changes found |
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.
That fixes the issue for me!
Great! |
</Box> | ||
))} | ||
</> | ||
data.regularAppeals.nodes.map((appeal) => ( |
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.
@dr-bizz Do you know why moving it outside of the fragment changes things?
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 issue was the key
. At first, it was the appeal's name, which sometimes had duplicates. I switched it to the id
, which would be unique.
I don't think removing the fragment did anything apart from simplifying the code (in my opinion). Maybe React read the Fragment as an item and kept it in the render, but that is unlikely.
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.
Gotcha. I missed that the key
changed. That's probably what fixed it.
Description
Ensure React keeps track of the appeals, to ensure they are removed correctly when the user switches account.
Checklist: