하수관로 차트 / 사용자 입력 정보 api 요청 작업 중

This commit is contained in:
JIeunhuh
2025-05-16 16:32:02 +09:00
parent 6315c5406b
commit 9cf8a5355c
6 changed files with 79 additions and 44 deletions
+3 -1
View File
@@ -45,7 +45,7 @@ export function VerticalTable({
onPageChange(1);
}
}, [onPageChange, resetPageNo]);
useEffect(() => {
if (tableData.length > 0 && tableData[0]) {
setFormData(tableData[0] as { [key: string]: string | number | boolean });
@@ -85,6 +85,7 @@ export function VerticalTable({
{children && children[head.id] ? children[head.id] : isEditable ? (
head.type === "select" ? (
<select
id={head.id}
value={formData[head.id] ?? "-"}
onChange={(e) => handleInputChange(head.id, e.target.value)}
className="w-full border border-gray-300 rounded-sm px-2 py-1 text-xl border-radius-0"
@@ -97,6 +98,7 @@ export function VerticalTable({
</select>
) : head.type === "input" ? (
<input
id={head.id}
type="text"
value={formData[head.id] ?? ""}
onChange={(e) => handleInputChange(head.id, e.target.value)}