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(VBreadcrumbs): v-for key error when two items have identical texts #6642

Merged
merged 2 commits into from
Mar 3, 2019

Conversation

nekosaur
Copy link
Member

Description

Allows breadcrumbs with identical texts

Motivation and Context

closes #5454

How Has This Been Tested?

playground, test

Markup:

<template>
  <v-app id="inspire">
    <v-breadcrumbs :items="items" divider=">"></v-breadcrumbs>
  </v-app>
</template>

<script>
  export default {
    data: () => ({
    items: [
      {
        text: 'Dashboard',
        disabled: false,
        href: 'breadcrumbs_dashboard'
      },
      {
        text: 'Link 1',
        disabled: false,
        href: 'breadcrumbs_link_1'
      },
      {
        text: 'Dashboard',
        disabled: true,
        href: 'breadcrumbs_link_2'
      }
    ]
  })
}
</script>

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 feature but make 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 breaking changes).
  • My code follows the code style of this project.
  • I've added relevant changes to the documentation (applies to new features and breaking changes in core library)

@codecov
Copy link

codecov bot commented Feb 28, 2019

Codecov Report

Merging #6642 into master will increase coverage by 0.12%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6642      +/-   ##
==========================================
+ Coverage   85.68%   85.81%   +0.12%     
==========================================
  Files         298      298              
  Lines        7174     7246      +72     
  Branches     1785     1817      +32     
==========================================
+ Hits         6147     6218      +71     
- Misses        936      937       +1     
  Partials       91       91
Impacted Files Coverage Δ
...uetify/src/components/VBreadcrumbs/VBreadcrumbs.ts 95.83% <100%> (-4.17%) ⬇️
...tify/src/components/VAutocomplete/VAutocomplete.js 100% <0%> (ø) ⬆️
...ckages/vuetify/src/components/VTooltip/VTooltip.js 86.3% <0%> (+2.43%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8b45196...53f5daf. Read the comment docs.

@@ -37,6 +37,28 @@ test('VBreadcrumbs.js', ({ mount, compileToFunctions }) => {
expect(wrapper.html()).toMatchSnapshot()
})

it.only('should not complain about identical keys', () => {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
it.only('should not complain about identical keys', () => {
it('should not complain about identical keys', () => {

@vercel vercel bot temporarily deployed to staging March 3, 2019 22:54 Inactive
@johnleider johnleider merged commit 2146ca8 into master Mar 3, 2019
@johnleider johnleider deleted the fix/breadcrumbs-key branch March 3, 2019 22:54
@lock
Copy link

lock bot commented Apr 14, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please direct any non-bug questions to our Discord

@lock lock bot locked as resolved and limited conversation to collaborators Apr 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] Duplicate names in breadcrumbs array lead to error
2 participants