Skip to content

Dynamic segments for nested items not updating correctly #2800

Closed
@agnjunio

Description

Version

3.0.3

Reproduction link

https://jsfiddle.net/zrh122/3v4cj0qk/

Steps to reproduce

  • Click on Item 1
  • Click on Item 2
  • Click on type link

What is expected?

We end up at /item/2/logs

What is actually happening?

We end up at /item/1/logs


This behavior happens when we don't explicitly set a parent param for a child route. Setting $route.params.id before rendering the fixes the behavior, but this shouldn't be necessary as we already navigated to /item/2, but vue-router didn't update the dynamic segment.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions