동기화

This commit is contained in:
GA Pro
2026-05-15 00:25:18 +09:00
parent 88e14edffd
commit d5ed642c80
69 changed files with 2634 additions and 26 deletions
@@ -3,7 +3,7 @@ import { Skeleton } from 'antd';
import { AgGridReact } from '@ag-grid-community/react';
import { ModuleRegistry } from '@ag-grid-community/core';
import { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-model';
import type { ColDef, GridReadyEvent, GridApi, RowClassParams, RowStyle } from '@ag-grid-community/core';
import type { ColDef, GridReadyEvent, GridApi, RowClassParams, RowStyle, SelectionChangedEvent } from '@ag-grid-community/core';
import '@ag-grid-community/styles/ag-grid.css';
import '@ag-grid-community/styles/ag-theme-quartz.css';
import { GRAY } from '@/theme/tokens';
@@ -33,6 +33,8 @@ interface Props<T> {
rowKey?: keyof T;
/** 행별 스타일 콜백 (만료 임박 강조 등) */
getRowStyle?: (params: RowClassParams<T>) => RowStyle | undefined;
rowSelection?: 'single' | 'multiple';
onSelectionChanged?: (e: SelectionChangedEvent<T>) => void;
}
/**
@@ -50,6 +52,8 @@ export default function DataGrid<T extends Record<string, unknown>>({
onCellChanged,
rowKey,
getRowStyle: getRowStyleProp,
rowSelection: rowSelectionProp = 'single',
onSelectionChanged,
}: Props<T>) {
const apiRef = useRef<GridApi<T> | null>(null);
@@ -93,7 +97,8 @@ export default function DataGrid<T extends Record<string, unknown>>({
rowHeight={56}
headerHeight={44}
localeText={AG_GRID_LOCALE_KO}
rowSelection="single"
rowSelection={rowSelectionProp}
onSelectionChanged={onSelectionChanged}
getRowId={rowKey ? (p) => String(p.data[rowKey]) : undefined}
pinnedBottomRowData={pinnedBottomRow ? [pinnedBottomRow as T] : undefined}
getRowStyle={(params) => {