[bug]: (sidebar-13): Function components cannot be given refs when using Sidebar in a Dialog #6872
Open
2 tasks done
Labels
bug
Something isn't working
Describe the bug
When using the Sidebar component within a Dialog component from shadcn/ui, a warning is thrown in the console:
Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
Affected component/components
SidebarMenuButton
How to reproduce
shadcn/ui
components installed.settings-dialog.tsx
file with the provided code that nests a Sidebar inside a Dialog.page.tsx
file in theapp/dashboard
directory with the provided code to render the SettingsDialog.npm run dev
or equivalent.Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
Codesandbox/StackBlitz link
https://ui.shadcn.com/blocks/sidebar#sidebar-13
Logs
System Info
Before submitting
The text was updated successfully, but these errors were encountered: