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

Fix Snabbdom patching issue #39

Merged
merged 7 commits into from
Jun 24, 2017
Merged

Fix Snabbdom patching issue #39

merged 7 commits into from
Jun 24, 2017

Conversation

mariusmuja
Copy link
Collaborator

This PR fixes issue #38.

The patch assigns a key to a VNode's data object that contains changeables and doesn't already have a key in order to force Snabbdom to destroy/re-create it when patched with new changeables. It also fixes the DataObject.updateAttributes method by passing the key to the newly constructed DataObject.

I've also been doing some refactoring, most notably turned DataObject and Hooks in the Snabbdom facade into @ScalaJSDefined traits for extra type safety (this would have prevented the DataObject.updateAttributes bug for example).

@KadekM
Copy link
Contributor

KadekM commented Jun 24, 2017

I wonder if this could potentially help with #7 ?

@LukaJCB
Copy link
Member

LukaJCB commented Jun 24, 2017

Wow! That's really awesome! Thank you so so much!

The only small thing I'd like to add is a test case that tests this behaviour, we could probably use the minimal test case you gave in #38. I can add it myself if you're too busy.

Again, thank you so much!

@mariusmuja
Copy link
Collaborator Author

I added a test case for this behaviour.

@mariusmuja
Copy link
Collaborator Author

@KadekM Yes, this fixes #7, it's the same issue.

@LukaJCB LukaJCB merged commit eb006da into outwatch:master Jun 24, 2017
@LukaJCB
Copy link
Member

LukaJCB commented Jun 24, 2017

Thank you again, really appreciate this! I'll make a release later today!

@mariusmuja
Copy link
Collaborator Author

@LukaJCB You're welcome! Thank you for outwatch, it's an awesome project.

@LukaJCB
Copy link
Member

LukaJCB commented Jun 24, 2017

Version 0.10.1 is live! :)

@mariusmuja mariusmuja deleted the key_fix branch June 28, 2017 19:11
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.

3 participants