You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assuming it's because of the primitives, using v-show triggers a warning for every Nuxt UI (and Nuxt UI Pro) component, stating a runtime directive was used on a component with a non-element root node. This makes it impossible to apply conditional display unless using v-if, which doesn't cover the use cases that v-show does.
Additional context
No response
Logs
Example from my project of a button:
[Vue warn]: Runtime directive used on component with non-element root node. The directives will not functionas intended.
at <NuxtLink class="inline-flex items-center focus:outline-none disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75 transition-colors gap-1.5 hover:bg-[var(--ui-primary)]/75 disabled:bg-[var(--ui-primary)] aria-disabled:bg-[var(--ui-primary)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-primary)] p-4 text-lg max-w-md w-full mx-auto rounded-lg bg-primary shadow-lg text-black font-semibold justify-center" raw=true custom="">
at <Link type="button" disabled=false class="inline-flex items-center focus:outline-none disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75 transition-colors gap-1.5 hover:bg-[var(--ui-primary)]/75 disabled:bg-[var(--ui-primary)] aria-disabled:bg-[var(--ui-primary)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-primary)] p-4 text-lg max-w-md w-full mx-auto rounded-lg bg-primary shadow-lg text-black font-semibold justify-center" ... >
at <Button type="button" loading=false class="p-4 text-lg max-w-md w-full mx-auto rounded-lg bg-primary shadow-lg text-black font-semibold justify-center" ... >
at <Index onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined >>
at <Anonymous key="/" vnode= {__v_isVNode: true, __v_skip: true, type: {…}, props: {…}, key: null, …} route= {fullPath: '/', hash: '', query: {…}, name: 'index', path: '/', …} ... >
at <RouterView name=undefined route=undefined >
at <NuxtPage>
at <Default ref=Ref< undefined >>
at <LayoutLoader key="default" layoutProps= {ref: RefImpl} name="default">
at <NuxtLayoutProvider layoutProps= {ref: RefImpl} key="default" name="default" ... >
at <NuxtLayout>
at <ToastProvider swipe-direction="right" duration=5000 >
at <Toaster key=0 >
at <TooltipProvider>
at <ConfigProvider use-id=fn<use-id> dir="ltr">
at <App>
at <App key=4 >
at <NuxtRoot>
The text was updated successfully, but these errors were encountered:
GalacticHypernova
changed the title
[v3]: v-show causes a runtime warning due to non-element root nodes
[v3]: v-show causes a runtime warning due to non-element root nodes and doesn't work correctly
Dec 9, 2024
GalacticHypernova
changed the title
[v3]: v-show causes a runtime warning due to non-element root nodes and doesn't work correctly
[v3]: v-show causes a runtime warning and breaks
Dec 9, 2024
Environment
Version
v3.x
Reproduction
Description
Assuming it's because of the primitives, using v-show triggers a warning for every Nuxt UI (and Nuxt UI Pro) component, stating a runtime directive was used on a component with a non-element root node. This makes it impossible to apply conditional display unless using v-if, which doesn't cover the use cases that v-show does.
Additional context
No response
Logs
Example from my project of a button:
The text was updated successfully, but these errors were encountered: