Open
Description
Describe the bug
See the error displayed if there are no components in the title:
- Solution:
Add this code snippet to the Sidebar component
<SheetTitle className="hidden"></SheetTitle> {/*👈🏻 */}
<SheetDescription className="hidden"></SheetDescription> {/*👈🏻 */}
In the condition
if (isMobile) {
return (
<Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>
<SheetTitle className="hidden"></SheetTitle> {/*👈🏻 */}
<SheetDescription className="hidden"></SheetDescription> {/*👈🏻 */}
<SheetContent
data-sidebar="sidebar"
data-mobile="true"
className="w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden"
style={
{
"--sidebar-width": SIDEBAR_WIDTH_MOBILE,
} as React.CSSProperties
}
side={side}
>
<div className="flex h-full w-full flex-col">{children}</div>
</SheetContent>
</Sheet>
);
}
Affected component/components
Sidebar
How to reproduce
- Do the standard structuring to display the sidebar
- Change the layout to mobile
- Click to display the sidebar
Codesandbox/StackBlitz link
No response
Logs
System Info
Chrome
Before submitting
- I've made research efforts and searched the documentation
- I've searched for existing issues
Activity