Add actions table column

This commit is contained in:
jeffvli 2023-07-18 17:37:32 -07:00
parent 817675ee0e
commit 179129b7cb
6 changed files with 79 additions and 24 deletions

View file

@ -33,6 +33,7 @@ import { TableColumn, TablePagination as TablePaginationType } from '/@/renderer
import { FavoriteCell } from '/@/renderer/components/virtual-table/cells/favorite-cell';
import { RatingCell } from '/@/renderer/components/virtual-table/cells/rating-cell';
import { TablePagination } from '/@/renderer/components/virtual-table/table-pagination';
import { ActionsCell } from '/@/renderer/components/virtual-table/cells/actions-cell';
export * from './table-config-dropdown';
export * from './table-pagination';
@ -50,6 +51,14 @@ const TableWrapper = styled.div`
dayjs.extend(relativeTime);
const tableColumns: { [key: string]: ColDef } = {
actions: {
cellClass: 'ag-cell-favorite',
cellRenderer: (params: ICellRendererParams) => ActionsCell(params),
colId: TableColumn.ACTIONS,
headerComponent: () => <></>,
suppressSizeToFit: true,
width: 25,
},
album: {
cellRenderer: (params: ICellRendererParams) =>
GenericCell(params, { isLink: true, position: 'left' }),