Skip to content

Fix overflow-x on AppContent #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/js/layouts/app/app-sidebar-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function AppSidebarLayout({ children, breadcrumbs = [] }: PropsWi
return (
<AppShell variant="sidebar">
<AppSidebar />
<AppContent variant="sidebar">
<AppContent variant="sidebar" className="overflow-x-hidden">
<AppSidebarHeader breadcrumbs={breadcrumbs} />
{children}
</AppContent>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/pages/dashboard.tsx
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tnylea Sure! It is easy to reproduce. Just append the class min-w-[2000px] in line 18 in dashboard.tsx.

This PR fixes all overflow errors for people like me, copying the dashboard.tsx file as a template to create additional pages.

An example would be to use a shadcn table. If the table width goes beyond the browser width, you would have to scroll. When scrolling, the header is not fixed (like in the videos mentioned above).

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function Dashboard() {
return (
<AppLayout breadcrumbs={breadcrumbs}>
<Head title="Dashboard" />
<div className="flex h-full flex-1 flex-col gap-4 rounded-xl p-4">
<div className="flex h-full flex-1 flex-col gap-4 rounded-xl p-4 overflow-x-auto">
<div className="grid auto-rows-min gap-4 md:grid-cols-3">
<div className="border-sidebar-border/70 dark:border-sidebar-border relative aspect-video overflow-hidden rounded-xl border">
<PlaceholderPattern className="absolute inset-0 size-full stroke-neutral-900/20 dark:stroke-neutral-100/20" />
Expand Down