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(VCarousel): add keys to delimiter buttons #15459

Merged
merged 2 commits into from Aug 5, 2022

Conversation

Tofandel
Copy link
Contributor

@Tofandel Tofandel commented Jul 18, 2022

Motivation and Context

The missing key would create issues with SSR, the controls would in some rare random cases get duplicated
image

The vue doc does say it's required on templated v-for custom components, I don't know how much of that applies to render components but from some reading through vue's code and some debugging, I'm confident the same applies
https://vuejs.org/style-guide/rules-essential.html#use-keyed-v-for

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any features but makes things better)

Checklist:

  • The PR title is no longer than 64 characters.
  • The PR is submitted to the correct branch (master for bug fixes and documentation updates, dev for new features and backwards compatible changes and next for non-backwards compatible changes).
  • My code follows the code style of this project.

@Tofandel
Copy link
Contributor Author

Ideally I'd use something unique in this.items[i], but except the internal _uid of the component there doesn't seem to be anything else to identify it, but given that this is not using transitions and that if the items change the render gets invalidated, using the loop index is fine

@KaelWD KaelWD changed the title fix: missing key in for loop fix(VCarousel): add keys to delimiter buttons Aug 5, 2022
@KaelWD KaelWD merged commit 8d3895b into vuetifyjs:master Aug 5, 2022
@KaelWD KaelWD added this to the v2.6.x milestone Aug 5, 2022
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.

None yet

2 participants