summaryrefslogtreecommitdiff
path: root/lib/swp/table/swp-table.tsx
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-11-20 19:36:01 +0900
committerjoonhoekim <26rote@gmail.com>2025-11-20 19:36:01 +0900
commit935fd22e17afc034a472bc2d159de7b9f5e5dcae (patch)
tree6beea33ab38750be17632dffca5e05e644647365 /lib/swp/table/swp-table.tsx
parentb75b1cd920efd61923f7b2dbc4c49987b7b0c4e1 (diff)
(김준회) PO, POS, swp
- PO: 발주서출력기능 초안 - 벤더측 POS 다운로드 기능 추가 - Contract 생성시 Status 설정 (mapper) - swp document registration table 로직 리팩터링 - swp: 입력가능 문서번호 validation 추가 (리스트 메뉴에서 Completed 된 건)
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>
))}