diff --git a/src/modules/basis/flight/models/basisFlightModel.ts b/src/modules/basis/flight/models/basisFlightModel.ts index 09d2e1d..d420d00 100644 --- a/src/modules/basis/flight/models/basisFlightModel.ts +++ b/src/modules/basis/flight/models/basisFlightModel.ts @@ -512,7 +512,7 @@ export const initFlightBas = { areaType: '', fltMethod: '', bufferZone: 0, - fltElev: '', + fltElev: '0', createUserId: '', createDt: '', updateUserId: '', diff --git a/src/views/laanc/LaancStep1.js b/src/views/laanc/LaancStep1.js index 103fc09..ac6089c 100644 --- a/src/views/laanc/LaancStep1.js +++ b/src/views/laanc/LaancStep1.js @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from 'react'; +import React, { useEffect, useState, useRef } from 'react'; import { useHistory, useLocation } from 'react-router-dom'; import { Search } from 'react-feather'; import { BiBuildings, BiGridAlt } from 'react-icons/bi'; @@ -47,7 +47,8 @@ export default function LaancStep1({ const { user } = useSelector(state => state.authState); const history = useHistory(); - + const fltElevRef = useRef(null); + const bufferZoneRef = useRef(null); const location = useLocation(); const queryParams = new URLSearchParams(location.search); const mapParam = queryParams.get('map'); @@ -57,7 +58,24 @@ export default function LaancStep1({ if (!currentParm) setCenteredModal(mapParam); }, [location]); - // console.log('>', data); + // const handleInputClick = () => { + // // Input 요소가 포커스될 때 커서를 맨 뒤로 이동 + // if (fltElevRef.current) { + // const input = fltElevRef.current; + + // const inputValue = input.value; + // input.setSelectionRange(inputValue.length - 1, inputValue.length - 1); + // input.focus(); + // } + // if (bufferZoneRef.current) { + // const input = bufferZoneRef.current; + + // const inputValue = input.value; + // input.setSelectionRange(inputValue.length - 1, inputValue.length - 1); + // input.focus(); + // } + // }; + return ( <> @@ -234,7 +252,7 @@ export default function LaancStep1({ id='fltElev' name='fltElev' // defaultValue={data.email || ''} - value={data.areaList[0].fltElev} + value={data.areaList[0].fltElev + 'm'} size='sm' onChange={e => { const { name, value } = e.target; @@ -244,6 +262,8 @@ export default function LaancStep1({ value }); }} + // innerRef={fltElevRef} // Input 요소에 ref를 연결 + // onClick={handleInputClick} // innerRef={data} placeholder='100m' /> @@ -259,7 +279,7 @@ export default function LaancStep1({ id='bufferZone' name='bufferZone' // defaultValue={data.email || ''} - value={data.areaList[0].bufferZone} + value={data.areaList[0].bufferZone + 'm'} size='sm' onChange={e => { const { name, value } = e.target; @@ -269,6 +289,8 @@ export default function LaancStep1({ value }); }} + // innerRef={bufferZoneRef} // Input 요소에 ref를 연결 + // onClick={handleInputClick} // innerRef={data} placeholder='100m' /> @@ -458,7 +480,8 @@ export default function LaancStep1({