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] [vue.warn]: Slot "default" invoked outside of the render function when using computed in VBtn #19531

Closed
HendrikJan opened this issue Apr 2, 2024 · 3 comments
Labels
S: triage upstream Problem with a third party library that we may have to work around

Comments

@HendrikJan
Copy link
Contributor

Environment

Vuetify Version: 3.5.13
Vue Version: 3.4.21
Browsers: Firefox 124.0
OS: Ubuntu undefined

Steps to reproduce

  • Open the reproduction
  • Go to "Page 2"
  • See the error message in your browser console

Expected Behavior

No error in your browser console

Actual Behavior

Error in your browser console when you navigate to "Page 2".
The error states:

[Vue warn]: Slot "default" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead. 
  at <VDefaultsProvider key="content-defaults" disabled=true defaults= Object > 
  at <VBtn> 
  at <VContainer> 
  at <VDefaultsProvider defaults= Object > 
  at <VToolbar ref=Ref< Proxy(Object) > class="v-app-bar" style= Object  ... > 
  at <VAppBar> 
  at <VApp> 
  at <Default ref=Ref< Proxy(Object) > > 
  at <LayoutLoader key="default" layoutProps= Object name="default" > 
  at <NuxtLayoutProvider layoutProps= Object key="default" name="default"  ... > 
  at <NuxtLayout> 
  at <App key=3 > 
  at <NuxtRoot>

Reproduction Link

https://stackblitz.com/edit/github-o9ivmk-sej5v9?file=composables%2FuseTwoStepFetch.ts

Other comments

This looks a bit like issue #17718, but in this case I am not using nuxt-icon.

@psgganesh
Copy link

What is this issue? I have been getting this whenever i use v-navigation-drawer / app-bar or any other vuetify component?

@KaelWD
Copy link
Member

KaelWD commented Sep 20, 2024

This is still a vue bug, we're just calling slots.default() in render.

@KaelWD KaelWD closed this as not planned Won't fix, can't repro, duplicate, stale Sep 20, 2024
@KaelWD KaelWD added the upstream Problem with a third party library that we may have to work around label Sep 20, 2024
@ipanamski
Copy link

I am getting this error in Nuxt using v-bottom-navigation, containing two v-btns with :to={ name: 'my-route' }.
By the way, the error disappears when I have only one v-btn or when I remove the to prop.

I solved it by wrapping the v-btn in nuxt-link like this:

<nuxt-link :to="{ name: 'my-route' }" custom v-slot="{ navigate, isActive }">
  <v-btn :active="isActive" @click="navigate">
    <v-icon icon="mdi-flask"></v-icon>
    Harmful Things
  </v-btn>
</nuxt-link>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: triage upstream Problem with a third party library that we may have to work around
Projects
None yet
Development

No branches or pull requests

4 participants