Dropdown components not working on the Sidebar under React 18 #7335
mr-woodapple
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Not sure where to put it, as I'm not sure if it's actually a bug... But in case this helps someone, here you go.
Situation:
I was installing Vite with the React + TypeScript setup and then installed ShadCN. This installs React 19 by default, but when adding components from ShadCN, it'll warn about incompabilities when installing components (as you're using React 19, and not 18 as they suggest) I installed the components anyway with using
--force
).So I thought well, let's edit the
package.json
file (after deleting thepackage-lock.json
, set React and React-DOM to^18.0.0
, deletenode_modules
and reinstall everything.Don't do that - downgrading to React 18 breaks the Dropdown component for me when it's placed in the sidebar (breaking means that it has a
transform: 200%;
applied as a css class, which places the dropdown content outside the view).I'm not sure if I'm the error and if I did something wrong, so if someone knows more, please let me know. :)
Beta Was this translation helpful? Give feedback.
All reactions