sn: null 인경우, 공백으로 보이도록
This commit is contained in:
@@ -198,11 +198,8 @@ export function VerticalTable({
|
|||||||
head.type === "select" ? (
|
head.type === "select" ? (
|
||||||
<select
|
<select
|
||||||
id={head.id}
|
id={head.id}
|
||||||
value={
|
// DB 값이 null 이면 "null" 문자열이 선택값으로 들어가 목록에 없는 값이 되므로 빈 값으로 맞춘다.
|
||||||
formData[head.id] !== undefined
|
value={String(formData[head.id] ?? "")}
|
||||||
? String(formData[head.id])
|
|
||||||
: ""
|
|
||||||
}
|
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
handleInputChange(head.id, e.target.value)
|
handleInputChange(head.id, e.target.value)
|
||||||
}
|
}
|
||||||
@@ -323,11 +320,8 @@ export function VerticalTable({
|
|||||||
head.type === "select" ? (
|
head.type === "select" ? (
|
||||||
<select
|
<select
|
||||||
id={head.id}
|
id={head.id}
|
||||||
value={
|
// DB 값이 null 이면 "null" 문자열이 선택값으로 들어가 목록에 없는 값이 되므로 빈 값으로 맞춘다.
|
||||||
formData[head.id] !== undefined
|
value={String(formData[head.id] ?? "")}
|
||||||
? String(formData[head.id])
|
|
||||||
: ""
|
|
||||||
}
|
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
handleInputChange(head.id, e.target.value)
|
handleInputChange(head.id, e.target.value)
|
||||||
}
|
}
|
||||||
@@ -357,11 +351,8 @@ export function VerticalTable({
|
|||||||
? "number"
|
? "number"
|
||||||
: "text"
|
: "text"
|
||||||
}
|
}
|
||||||
value={
|
// DB 값이 null 이면 "null" 글자가 입력칸에 보이므로 빈칸으로 맞춘다.
|
||||||
formData[head.id] !== undefined
|
value={String(formData[head.id] ?? "")}
|
||||||
? String(formData[head.id])
|
|
||||||
: ""
|
|
||||||
}
|
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
if (head.isNumber) {
|
if (head.isNumber) {
|
||||||
const newValue = e.target.value;
|
const newValue = e.target.value;
|
||||||
|
|||||||
Reference in New Issue
Block a user