[st] - any type 수정, 검토 그리드 cell style 수정

This commit is contained in:
2026-06-30 17:59:11 +09:00
parent 1236a24b61
commit 25417dcda1
21 changed files with 189 additions and 55 deletions
+14 -10
View File
@@ -729,7 +729,6 @@ const DataGrid = ({
idFieldName = "id",
enableSort = false,
gridHeight = 55, // vh 단위
onRowDblClick,
headerHeight = 60,
fitStyle = GridFitStyle.EVEN,
}: DataGridProps) => {
@@ -789,20 +788,25 @@ useEffect(() => {
const gridView = gridRef.current?.gridView;
if (!gridView || !onCellDblClick) return;
(gridView as any).onCellDblClicked = (_grid: unknown, clickData: { cellType?: string; itemIndex?: number }) => {
gridView.onCellDblClicked = (_grid, clickData) => {
if (clickData.cellType !== "data" || clickData.itemIndex === undefined) return;
const row = rowDataRef.current[clickData.itemIndex];
const cellIndex = (gridView as any).getCurrent?.();
const fieldName = cellIndex?.fieldName ?? cellIndex?.column ?? "";
if (row) onCellDblClick({ // ← 여기는 Props 콜백 호출이라 그대로
row: row as Record<string, string | number>,
fieldName,
itemIndex: clickData.itemIndex
});
const cellIndex = gridView.getCurrent();
const column = cellIndex.column;
const fieldName =
cellIndex.fieldName ??
(typeof column === "string" ? column : "");
if (row) {
onCellDblClick({
row: row as Record<string, string | number>,
fieldName,
itemIndex: clickData.itemIndex,
});
}
};
return () => {
(gridView as any).onCellDblClicked = undefined;
gridView.onCellDblClicked = undefined;
};
}, [onCellDblClick]);
useLayoutEffect(() => {