-
Notifications
You must be signed in to change notification settings - Fork 922
Closed
Labels
bugSomething isn't workingSomething isn't workingp3-lowMinor cosmetic, edge case, or documentation issueMinor cosmetic, edge case, or documentation issuev3#1289#1289
Description
Environment
- Operating System: Darwin
- Node Version: v22.14.0
- Nuxt Version: 4.0.3
- CLI Version: 3.27.0
- Nitro Version: 2.12.4
- Package Manager: [email protected]
- Builder: -
- User Config: -
- Runtime Modules: -
- Build Modules: -
Is this bug related to Nuxt or Vue?
Nuxt
Package
v3.x
Version
latest
Reproduction
https://codesandbox.io/p/devbox/frosty-goodall-2wn4kw
Description
If we make a condition for the appearance of a slot and it is initially false, then we will never see it. This is because slots are not reactive.
Components that contain an error:
- CheckboxGroup
- DropdownMenu
- DropdownMenuContent
- ContextMenu
- ChangelogVersions
- ChatMessages
- ChatPrompt
- DashboardSearch
- DashboardSearchButton
- content/ContentSearch
- content/ContentSearchButton
Solutions
One way to solve this is to not create a variable, but to immediately write omit(slots, [‘...’]) in the template. This will fix the rendering error, but vue will still not show the number of available slots.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingp3-lowMinor cosmetic, edge case, or documentation issueMinor cosmetic, edge case, or documentation issuev3#1289#1289