Replies: 1 comment 3 replies
-
You don't seem to be following it correctly. You need to invoke |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The documentation for useSidebar here does not seem to be working: https://next.shadcn-svelte.com/docs/components/sidebar#usesidebar
In the same page, another doc refers a different way for the same: https://next.shadcn-svelte.com/docs/components/sidebar#custom-trigger
This one fails with error:
Uncaught TypeError: Cannot read properties of undefined (reading 'toggle')
Can't get either to work. I am new with Svelte and Shadcn, so maybe I am doing something wrong.
I tried configuring a class binding like so, and it does work. This span is inside
Sidebar.MenuButton
But when trying to do the same on click event, it fails.
Error in browser console:
Uncaught Svelte error: lifecycle_outside_component
Updating above button click event to use sidebar variable results in undefined error.
Please help.
Beta Was this translation helpful? Give feedback.
All reactions