Open JangAyeon opened 2 years ago
사용자의 추가 주소 입력값이 누적 입력되는 오류
추가 주소 입력 시 타이핑 입력 순차적으로 값이 할당됨 아마 이벤트 발생시 바로 setState
으로 할당되어서 그런 것 같다!!
{!(Zonecode && Address) ? (
<button name="Address" onClick={onClick_Pop}>
🔍︎ 주소 검색
</button>
) : (
<>
<input
type="text"
placeholder="나머지 주소를 입력하시오"
onChange={(e) => {
setInputs({
...inputs,
Address: `${Address} ${String(e.target.value)}`,
});
console.log(inputs);
}}
></input>
</>
)}
사용자의 추가 주소 입력값이 누적되어 입력되는 오류 수정
<>
<input
className="signup_ExtraAddress_input"
type="text"
name="ExtraAddress"
placeholder="나머지 주소를 입력하시오"
onChange={onChange}
value={ExtraAddress}
/>
</>