[st] - 그리드 style 적용 로직 수정, 로그 조회 일정 선택 로직 수정(최대 1년 제한)

This commit is contained in:
2026-07-03 16:19:27 +09:00
parent 4c7666169c
commit f1fcfa9ee4
4 changed files with 164 additions and 29 deletions
+24 -1
View File
@@ -61,6 +61,25 @@ type GridColumnWithStyleCallback = {
) => CellStyleCallbackResult;
};
function mergeGridRowsWithSourceMetadata(
rows: Record<string, string | number>[],
sourceRows: Record<string, string | number>[],
columnFieldNames: string[],
): Record<string, string | number>[] {
const columnFieldSet = new Set(columnFieldNames);
return rows.map((row, index) => {
const source = sourceRows[index];
if (!source) return row;
const merged: Record<string, string | number> = { ...row };
for (const [key, value] of Object.entries(source)) {
if (columnFieldSet.has(key) || value === undefined) continue;
merged[key] = value as string | number;
}
return merged;
});
}
function applyCellStyleCallbacksToColumns(
gridView: unknown,
columns: ColumnConfig[],
@@ -1620,7 +1639,11 @@ useEffect(() => {
r[f] = ds.getValue(i, f) as string | number;
rows.push(r);
}
return rows;
return mergeGridRowsWithSourceMetadata(
rows,
rowDataRef.current,
fieldNames,
);
};
}