Skip to content

Conversation

@gribnoysup
Copy link
Contributor

External Links

Description

When index is being used as a key and a field is removed from the list, react keeps the elemet around with incorrect state (see before / after)

Notes for Reviewers

I don't see any tests for node field updating, so not sure where to add one, but it would be good to merge the fix to get it to compass as this is affecting field editing and expand collapse a lot

📸 Screenshots/Screencasts

Before

Kapture 2025-10-14 at 15 47 26

After

Kapture 2025-10-14 at 16 53 30

@paula-stacho
Copy link
Collaborator

I'm confused as to what is happening in the videos 🙈 Is github automatically converting them to gifs because they're short or do you have control over that?

@gribnoysup
Copy link
Contributor Author

To repro the issue you can on current main create a bunch of fields in the Node and start deleting them from the middle. You will see that the fields are removed from the bottom always

@gribnoysup
Copy link
Contributor Author

Wasn't sure still where a good place for a test would be, but decided I'll just add one in the main diagram test suite

Copy link
Collaborator

@paula-stacho paula-stacho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, I'm not able to reproduce the issue, but I agree the keys are not good as they were

@gribnoysup
Copy link
Contributor Author

Well, I have it on (a confusing) record 😈

@gribnoysup gribnoysup merged commit 2b5a180 into main Oct 15, 2025
5 checks passed
@gribnoysup gribnoysup deleted the COMPASS-9956 branch October 15, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants