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

[Bug Report][3.5.13] router composable that is used for links in buttons is not reactive #19515

Closed
realityfilter opened this issue Mar 30, 2024 · 0 comments
Assignees
Labels
E: router T: bug Functionality that does not work as intended/expected
Milestone

Comments

@realityfilter
Copy link

Environment

Vuetify Version: 3.5.13
Vue Version: 3.4.21
Browsers: Google Chrome
OS: Mac OS 10.15.7

Steps to reproduce

  • npm install
  • vite
  • click the counter button and inspect the link the other button points to

Expected Behavior

The button link is reactive and points to the current computed href.

Actual Behavior

The href of the button is the initial value.

Reproduction Link

https://github.com/realityfilter/bugreport-vuetify-nonreactive-links

Other comments

The culprit is in my opinion the following line:

const linkProps = computed(() => ({ ...props, to: props.to ? props.to : {} }))

Changing to

  const linkProps = computed(() => ({
    ...props,
    to: toRef(() => props.to || {})
  }));

keeps reactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E: router T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

No branches or pull requests

2 participants