Merge remote-tracking branch 'upstream/main'
All checks were successful
Build and Push Images / build-and-push (push) Successful in 13m14s
All checks were successful
Build and Push Images / build-and-push (push) Successful in 13m14s
This commit is contained in:
@@ -267,11 +267,13 @@ export const FieldChooser: React.FC<FieldChooserProps> = ({
|
|||||||
const existingConfig = selectedFields.find((f) => f.field === field.field);
|
const existingConfig = selectedFields.find((f) => f.field === field.field);
|
||||||
|
|
||||||
if (area === "none") {
|
if (area === "none") {
|
||||||
// 필드 제거 또는 숨기기
|
// 🆕 필드 완전 제거 (visible: false 대신 배열에서 제거)
|
||||||
if (existingConfig) {
|
if (existingConfig) {
|
||||||
const newFields = selectedFields.map((f) =>
|
const newFields = selectedFields.filter((f) => f.field !== field.field);
|
||||||
f.field === field.field ? { ...f, visible: false } : f
|
console.log("🔷 [FieldChooser] 필드 제거:", {
|
||||||
);
|
removedField: field.field,
|
||||||
|
remainingFields: newFields.length,
|
||||||
|
});
|
||||||
onFieldsChange(newFields);
|
onFieldsChange(newFields);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -282,6 +284,10 @@ export const FieldChooser: React.FC<FieldChooserProps> = ({
|
|||||||
? { ...f, area, visible: true }
|
? { ...f, area, visible: true }
|
||||||
: f
|
: f
|
||||||
);
|
);
|
||||||
|
console.log("🔷 [FieldChooser] 필드 영역 변경:", {
|
||||||
|
field: field.field,
|
||||||
|
newArea: area,
|
||||||
|
});
|
||||||
onFieldsChange(newFields);
|
onFieldsChange(newFields);
|
||||||
} else {
|
} else {
|
||||||
// 새 필드 추가
|
// 새 필드 추가
|
||||||
@@ -294,6 +300,10 @@ export const FieldChooser: React.FC<FieldChooserProps> = ({
|
|||||||
summaryType: area === "data" ? "sum" : undefined,
|
summaryType: area === "data" ? "sum" : undefined,
|
||||||
areaIndex: selectedFields.filter((f) => f.area === area).length,
|
areaIndex: selectedFields.filter((f) => f.area === area).length,
|
||||||
};
|
};
|
||||||
|
console.log("🔷 [FieldChooser] 필드 추가:", {
|
||||||
|
field: field.field,
|
||||||
|
area,
|
||||||
|
});
|
||||||
onFieldsChange([...selectedFields, newField]);
|
onFieldsChange([...selectedFields, newField]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user