Skip to content
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

improve softMatch to not retain state on morph if oldNode has id #82

Merged
merged 2 commits into from
Dec 23, 2024

Conversation

MichaelWest22
Copy link
Contributor

Improving softMatching so it handles not retaining state in error when morphing nodes with id's

If the old node has an id it could have some state that is important not to morph into a similar element so we can check for its ID and if either the new element has no ID or a different ID then we want to avoid morphing these nodes. Better to instead drop the node and re-add the new content instead.

Added new test with a checkbox with indeterminate state that will not be prevented from morphing and retaining invalid state.
Also had to fix two tests that had id's on the from side of the morph which would now prevent morphing

@1cg
Copy link
Contributor

1cg commented Dec 23, 2024

@MichaelWest22 can you update this against the latest in main? I don't want to screw up the merge.

@1cg 1cg merged commit d1dd518 into bigskysoftware:main Dec 23, 2024
2 checks passed
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.

2 participants