-
Notifications
You must be signed in to change notification settings - Fork 42
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
Conversation
…efined for DataObject for more type safety. Automatically create a key if not provided and a changeable is present.
I wonder if this could potentially help with #7 ? |
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! |
I added a test case for this behaviour. |
Thank you again, really appreciate this! I'll make a release later today! |
@LukaJCB You're welcome! Thank you for outwatch, it's an awesome project. |
Version 0.10.1 is live! :) |
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 constructedDataObject
.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 theDataObject.updateAttributes
bug for example).