diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-10-01 09:48:03 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-10-01 09:48:03 +0000 |
| commit | 33e8452331c301430191b3506825ebaf3edac93a (patch) | |
| tree | 6d92d754dbd30cafe0f3f920a14d6d6031c624b8 /lib/pq/pq-criteria | |
| parent | 8ac4e8d9faa6e86ca6c7ab475efd7462d76fc9b6 (diff) | |
(최겸) 구매 PQ 리스트 기능 수정, 견적 첨부파일 리비전 액션 추가, 기타 등
Diffstat (limited to 'lib/pq/pq-criteria')
| -rw-r--r-- | lib/pq/pq-criteria/pq-table-column.tsx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/pq/pq-criteria/pq-table-column.tsx b/lib/pq/pq-criteria/pq-table-column.tsx index de7396bf..32d6cc32 100644 --- a/lib/pq/pq-criteria/pq-table-column.tsx +++ b/lib/pq/pq-criteria/pq-table-column.tsx @@ -1,6 +1,7 @@ "use client" import * as React from "react" +import { useMemo } from "react" import { ColumnDef } from "@tanstack/react-table" import { formatDate } from "@/lib/utils" import { Checkbox } from "@/components/ui/checkbox" @@ -179,7 +180,10 @@ export function getColumns({ header: ({ column }) => ( <DataTableColumnHeaderSimple column={column} title="생성일" /> ), - cell: ({ cell }) => formatDate(cell.getValue() as Date, "ko-KR"), + cell: ({ cell }) => { + const dateValue = cell.getValue() as Date + return useMemo(() => formatDate(dateValue, "ko-KR"), [dateValue]) + }, enableResizing: true, minSize: 180, size: 180, @@ -189,7 +193,10 @@ export function getColumns({ header: ({ column }) => ( <DataTableColumnHeaderSimple column={column} title="수정일" /> ), - cell: ({ cell }) => formatDate(cell.getValue() as Date, "ko-KR"), + cell: ({ cell }) => { + const dateValue = cell.getValue() as Date + return useMemo(() => formatDate(dateValue, "ko-KR"), [dateValue]) + }, enableResizing: true, minSize: 180, size: 180, |
