Skip to content

Commit 460f83e

Browse files
committed
fix: full width when no resize
1 parent 0eb4986 commit 460f83e

File tree

1 file changed

+8
-4
lines changed
  • packages/ui-react/src/components/table

1 file changed

+8
-4
lines changed

packages/ui-react/src/components/table/table.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,25 +82,29 @@ function Table<TData>(props: Props<TData>) {
8282

8383
return (
8484
<>
85-
<pre style={{ minHeight: "10rem" }}>
85+
<pre className="mb-4 min-h-48">
8686
{JSON.stringify(
8787
{
88-
columnSizing: table.getState().columnSizing,
88+
// columnSizing: table.getState().columnSizing,
89+
// columnSizeVars,
8990
},
9091
null,
9192
2,
9293
)}
9394
</pre>
9495

9596
<Card
96-
className={cn("p-0 inline-block", className)}
97+
className={cn("p-0 inline-block overflow-auto", className)}
9798
{...otherProps}
9899
variant="light"
99100
>
100101
<table
101102
style={{
102103
...columnSizeVars,
103-
width: table.getTotalSize(),
104+
width:
105+
(table.options.enableColumnResizing ?? true)
106+
? table.getTotalSize()
107+
: "100%",
104108
}}
105109
>
106110
<thead className="border-b border-gray-300">

0 commit comments

Comments
 (0)