summaryrefslogtreecommitdiff
path: root/lib/swp/table/swp-table.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/swp/table/swp-table.tsx')
-rw-r--r--lib/swp/table/swp-table.tsx24
1 files changed, 20 insertions, 4 deletions
diff --git a/lib/swp/table/swp-table.tsx b/lib/swp/table/swp-table.tsx
index b6c3558b..6f810415 100644
--- a/lib/swp/table/swp-table.tsx
+++ b/lib/swp/table/swp-table.tsx
@@ -75,6 +75,8 @@ export function SwpTable({
data: filteredDocuments,
columns: swpDocumentColumns,
getCoreRowModel: getCoreRowModel(),
+ enableColumnResizing: false,
+ columnResizeMode: 'onChange',
});
// 문서 클릭 핸들러 - Dialog 열기
@@ -109,13 +111,20 @@ export function SwpTable({
</div>
{/* 테이블 */}
- <div className="rounded-md border">
- <Table>
+ <div className="rounded-md border overflow-x-auto">
+ <Table className="min-w-[1700px]">
<TableHeader>
{table.getHeaderGroups().map((headerGroup) => (
<TableRow key={headerGroup.id}>
{headerGroup.headers.map((header) => (
- <TableHead key={header.id}>
+ <TableHead
+ key={header.id}
+ style={{
+ width: header.column.getSize(),
+ minWidth: header.column.getSize(),
+ maxWidth: header.column.getSize(),
+ }}
+ >
{header.isPlaceholder
? null
: flexRender(
@@ -137,7 +146,14 @@ export function SwpTable({
onClick={() => handleDocumentClick(row.original)}
>
{row.getVisibleCells().map((cell) => (
- <TableCell key={cell.id}>
+ <TableCell
+ key={cell.id}
+ style={{
+ width: cell.column.getSize(),
+ minWidth: cell.column.getSize(),
+ maxWidth: cell.column.getSize(),
+ }}
+ >
{flexRender(cell.column.columnDef.cell, cell.getContext())}
</TableCell>
))}