@@ -23,6 +23,8 @@ export const column: ColumnDef<TableEmployeeInfo>[] = [
2323 accessorKey : 'id' ,
2424 header : ( { column } ) => < DataTableColumnHeader column = { column } title = "ID" /> ,
2525 enableSorting : true ,
26+ enableHiding : false ,
27+ size : 40 ,
2628 } ,
2729 {
2830 accessorKey : 'first_name' ,
@@ -67,28 +69,31 @@ export const column: ColumnDef<TableEmployeeInfo>[] = [
6769
6870 {
6971 id : 'actions' ,
70- cell : ( { row } ) => (
71- < DropdownMenu >
72- < DropdownMenuTrigger asChild >
73- < Button variant = "ghost" className = "h-8 w-8 p-0" >
74- < span className = "sr-only" > Open menu</ span >
75- < MoreHorizontal className = "h-4 w-4" />
76- </ Button >
77- </ DropdownMenuTrigger >
78- < DropdownMenuContent align = "end" >
79- < DropdownMenuLabel > Actions</ DropdownMenuLabel >
80- < DropdownMenuItem asChild >
81- < DropdownMenuCopyButton content = { row . original . full_name } > Copy Name</ DropdownMenuCopyButton >
82- </ DropdownMenuItem >
72+ cell : function Cell ( { row } ) {
73+ return (
74+ < DropdownMenu >
75+ < DropdownMenuTrigger asChild >
76+ < Button variant = "ghost" className = "size-8 p-0" >
77+ < span className = "sr-only" > Open menu</ span >
78+ < MoreHorizontal className = "size-4" />
79+ </ Button >
80+ </ DropdownMenuTrigger >
81+ < DropdownMenuContent align = "end" >
82+ < DropdownMenuLabel > Actions</ DropdownMenuLabel >
83+ < DropdownMenuItem asChild >
84+ < DropdownMenuCopyButton content = { row . original . full_name } > Copy Name</ DropdownMenuCopyButton >
85+ </ DropdownMenuItem >
8386
84- < DropdownMenuSeparator />
85- < DropdownMenuItem asChild >
86- < Link href = { employee_info . show ( row . original . id ) } prefetch >
87- Show
88- </ Link >
89- </ DropdownMenuItem >
90- </ DropdownMenuContent >
91- </ DropdownMenu >
92- ) ,
87+ < DropdownMenuSeparator />
88+ < DropdownMenuItem asChild >
89+ < Link href = { employee_info . show ( row . original . id ) } as = "button" >
90+ Show
91+ </ Link >
92+ </ DropdownMenuItem >
93+ </ DropdownMenuContent >
94+ </ DropdownMenu >
95+ ) ;
96+ } ,
97+ size : 40 ,
9398 } ,
9499] ;
0 commit comments