-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Updated to support keyed attributes #1076
Conversation
… a key on the nodes to not process the list. Issue yewstack#479
Switched to using remove instead of get_mut() to make it so we don't need to do a full scan. Issue yewstack#479
Thanks for picking this up @mrh0057! This feature is going to help a lot with performance!! |
Another thing to consider is what happens when the root node rendered by a component has a |
Nodes with keys are in a hashmap and nodes without are in vector. Added an error if duplicate keys are in the hashmap and outputs the duplicate key. Issue yewstack#479
I think by tracking the nodes without a key in a vector fixes this potential issue. |
I think I've made all the changes requested expect for the vlist to have a key attribute. |
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.
This is looking great! I added some more comments, but they're mostly small nits. Next step is adding a few macro tests, guide here: https://github.com/yewstack/yew/blob/master/CONTRIBUTING.md#macro-tests
sweet! thanks so much! last thing is making CI happy, could you please run |
Thanks, there are still two comments that are unaddressed: |
Removed the key comparision for vtag.
Thanks so much @mrh0057! I just fixed up one last clippy thing and now merging! |
is this change going to be in the next release of Yew? |
@Korede-TA yes! I should be able to put a release soon :) |
@Korede-TA v0.15 has just been released with this feature! |
Updated to allow keyed attributes.