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

Improve active route detection in TabMenu #830

Closed
noamichael opened this issue Jan 4, 2021 · 2 comments
Closed

Improve active route detection in TabMenu #830

noamichael opened this issue Jan 4, 2021 · 2 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@noamichael
Copy link
Contributor

Previously, #417 covered the issue where <TabMenu/> items were only consider active if the route path matched the item route exactly (=== vs. startsWith). This was fixed in commit 7fb409d`:

isActive(item) {
    return this.activeRoute.startsWith(item.to);
}

However, since commit 3f2b51a, the route match has reverted back to using exact matches only:

isActive(item) {
     return this.activeRoute === item.to;
}

I believe this is a regression and there should at least be an option to determine if the match should be exact or fuzzy much like the official vue router.

@cagataycivici cagataycivici changed the title Regression: <TabMenu/> does not include subpaths in active route detection Improve active route detection in TabMenu May 10, 2021
@cagataycivici cagataycivici added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add priority - medium labels May 10, 2021
@cagataycivici cagataycivici self-assigned this May 11, 2021
@cagataycivici cagataycivici added this to the 3.5.0 milestone May 11, 2021
@cagataycivici
Copy link
Member

There is a new property called exact to decide if route matching should be exact or not.

@beocaca
Copy link

beocaca commented Nov 22, 2021

  <TabMenu :model="subsTrackerTypes.tabs"
               :exact="false"
               v-model:activeIndex="activeIndex"
      />

how to exact false? i want to use v-model:activeIndex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

3 participants