Skip to content

Commit

Permalink
fix: sheet not overflowed correctly & use minmax for sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
iyxan23 committed Sep 17, 2024
1 parent 924127c commit 54b9be7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions site/src/components/xlsx/preview/SheetPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export default function SheetPreview({ file = null }: { file: File | null }) {

return (
<div
className="overflow-auto grid w-fit h-fit"
className="grid w-fit h-fit"
style={{
gridTemplateColumns: `repeat(${longest}, 1fr)`,
gridTemplateColumns: `repeat(${longest}, minmax(12rem, 1fr))`,
}}
>
{rows.map((row, i) => (
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/xlsx/preview/SheetPreviewDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function SheetPreviewDialog({
return (
<Dialog>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent className="max-h-[calc(100vh-2rem)] max-w-[calc(100vw-2rem)]">
<DialogContent className="max-h-[calc(100vh-2rem)] max-w-[calc(100vw-2rem)] grid grid-rows-[auto_1fr]">
<DialogHeader>
<DialogTitle>preview sheet</DialogTitle>
<DialogDescription>
Expand Down

0 comments on commit 54b9be7

Please sign in to comment.