Relative Content

Tag Archive for next.jsshadcnui

How to add a dynamic dependent select dropdown shad cn

so I’m trying to have a dropdown select option (sub-category) that depends on another select component (category).
So far, I have been able to dynamically populate the dependent select option (sub-category) with useEffect and useState. My only problem is when i say select a sub category like ‘Watches’ under Fashion and then switch to the Art category, the sub category select component shows a blank state instead of the default placeholder. I don’t know if someone can understand this but I’m kind of stuck here

Shadcn and Nextjs

When i reload my browser the webpage is not formatting in the right way like this