input 0일 경우에만 비워주기 추가

This commit is contained in:
hyojun.choi 2025-01-20 16:37:31 +09:00
parent ffbfc245b7
commit d4aa611b65

View File

@ -18,7 +18,11 @@ export default function OuterLineWall({ props }) {
className="input-origin block"
value={length1}
ref={length1Ref}
onFocus={(e) => (length1Ref.current.value = '')}
onFocus={(e) => {
if (length1Ref.current.value === '0') {
length1Ref.current.value = ''
}
}}
onChange={(e) => onlyNumberInputChange(e, setLength1)}
placeholder="3000"
/>