UDropdownMenu not opening.
Hi everyone,
After updating my NuxtUI package to "@nuxt/ui": "^3.0.0-beta.2", my dropdown menu has stopped functioning. I’ve tested this with my custom language switcher implementation as well as the example from the documentation, but neither instance activates the dropdown. There are no errors in the console or terminal, so I’m not sure what’s going wrong.
Modules that I'm using:
Below are the code I’ve tried:
Custom Language Switcher
I’m not seeing any errors during build or runtime. Has anyone encountered this issue with the latest beta? Could there be breaking changes in this release affecting the dropdown functionality, or might I be missing some configuration?
Thanks in advance for any insights!
3 Replies
Hi @ChikyNuggy. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
I understand you're having issues with the UDropdownMenu component after updating to
@nuxt/ui
version ^3.0.0-beta.2
. Based on the knowledge sources, I can identify a few potential issues.
Possible Issues
1. Component Name Change: Looking at the documentation, there's no direct reference to a UDropdownMenu
component in the Nuxt UI library. The component is actually called UDropdown
as shown in the Dropdown documentation.
2. Beta Version: You're using a beta version (^3.0.0-beta.2
) which might have breaking changes or bugs compared to the stable version.
Suggested Solutions
1. Use the correct component name: Try replacing UDropdownMenu
with UDropdown
in your template:
2. Check the items format: According to the Dropdown documentation, the items
prop expects an array of arrays, where each inner array represents a group of items. Your current implementation might not match this format.
3. Consider using a stable version: If you're encountering issues with the beta version, you might want to downgrade to a stable version of Nuxt UI. You can update your package.json as follows:
Or if you want to stay on the cutting edge, you could try the edge version as mentioned in the Edge documentation:
If none of these solutions work, it might be a specific issue with the beta version you're using. In that case, I'd recommend checking the GitHub repository for any reported issues or considering downgrading to a stable version until the beta issues are resolved.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@388399359928172545> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Hi everyone,
I wanted to share a quick update regarding the dropdown issue I mentioned earlier. I ended up removing my node_modules folder and package-lock.json, then reinstalled all dependencies one by one. I also chose not to add the nuxt-seo module during the reinstallation process. With these changes, everything is working perfectly now.