diff --git a/frontend/lib/registry/components/aggregation-widget/AggregationWidgetConfigPanel.tsx b/frontend/lib/registry/components/aggregation-widget/AggregationWidgetConfigPanel.tsx index fd38d3b9..ebfff828 100644 --- a/frontend/lib/registry/components/aggregation-widget/AggregationWidgetConfigPanel.tsx +++ b/frontend/lib/registry/components/aggregation-widget/AggregationWidgetConfigPanel.tsx @@ -34,7 +34,7 @@ export function AggregationWidgetConfigPanel({ onChange, screenTableName, }: AggregationWidgetConfigPanelProps) { - const [columns, setColumns] = useState>([]); + const [columns, setColumns] = useState>([]); const [loadingColumns, setLoadingColumns] = useState(false); const [availableTables, setAvailableTables] = useState>([]); const [loadingTables, setLoadingTables] = useState(false); @@ -93,6 +93,8 @@ export function AggregationWidgetConfigPanel({ columnName: col.columnName || col.column_name, label: col.displayName || col.columnLabel || col.column_label || col.label || col.columnName || col.column_name, dataType: col.dataType || col.data_type, + inputType: col.inputType || col.input_type, + webType: col.webType || col.web_type, })) ); } else { @@ -140,15 +142,19 @@ export function AggregationWidgetConfigPanel({ }); }; - // 숫자형 컬럼만 필터링 (count 제외) - const numericColumns = columns.filter( - (col) => - col.dataType?.toLowerCase().includes("int") || - col.dataType?.toLowerCase().includes("numeric") || - col.dataType?.toLowerCase().includes("decimal") || - col.dataType?.toLowerCase().includes("float") || - col.dataType?.toLowerCase().includes("double") - ); + // 숫자형 컬럼만 필터링 (count 제외) - 입력 타입(inputType/webType)으로만 확인 + const numericColumns = columns.filter((col) => { + const inputType = (col.inputType || col.webType || "")?.toLowerCase(); + + return ( + inputType === "number" || + inputType === "decimal" || + inputType === "integer" || + inputType === "float" || + inputType === "currency" || + inputType === "percent" + ); + }); return (