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

List transition example fix #2611

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

AloisSeckar
Copy link
Contributor

Description of Problem

In the List with transitions example, when you hit button, the array will revert to original [1, 2, 3, 4, 5], but the id for newly inserted items remains.

So then 7 is inserted instead of logical 6 and so on. You can end up with stuff like that:
image

Proposed Solution

Would be more logical to reset the id value as well.

I added the command to do it in each API variant.

Additional Information

Copy link

netlify bot commented Dec 16, 2023

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit 7bf5af8
🔍 Latest deploy log https://app.netlify.com/sites/vuejs/deploys/657d7bb75cf72c000827d0bc
😎 Deploy Preview https://deploy-preview-2611--vuejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@NataliaTepluhina NataliaTepluhina left a comment

Choose a reason for hiding this comment

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

Thank you, it's a nice little improvement 👍🏻

@NataliaTepluhina NataliaTepluhina merged commit a0b4a90 into vuejs:main Dec 19, 2023
5 checks passed
@AloisSeckar AloisSeckar deleted the list-transition-fix branch December 21, 2023 20:35
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