improve(dashboard): make actions sticky on the right for data table

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-10-15 22:02:35 +02:00
parent b693d0ba2b
commit 857a2b01d3
5 changed files with 55 additions and 19 deletions

View File

@@ -14,6 +14,7 @@ import { useRouter } from 'next/navigation';
import { pathOr } from 'ramda';
import { toast } from 'sonner';
import { ACTIONS } from '@/components/data-table';
import type { IServiceInvite, IServiceProject } from '@openpanel/db';
export function useColumns(
@@ -72,7 +73,7 @@ export function useColumns(
},
},
{
id: 'actions',
id: ACTIONS,
cell: ({ row }) => {
return <ActionCell row={row} />;
},

View File

@@ -14,6 +14,7 @@ import { useRouter } from 'next/navigation';
import { useRef, useState } from 'react';
import { toast } from 'sonner';
import { ACTIONS } from '@/components/data-table';
import type { IServiceMember, IServiceProject } from '@openpanel/db';
export function useColumns(projects: IServiceProject[]) {
@@ -59,7 +60,7 @@ export function useColumns(projects: IServiceProject[]) {
},
},
{
id: 'actions',
id: ACTIONS,
cell: ({ row }) => {
return <ActionsCell row={row} />;
},