주소 자동 완성 input 초기값 설정

This commit is contained in:
leedj312
2025-08-28 10:55:02 +09:00
parent 5ddf9fe6e0
commit abe7e51f37
@@ -14,7 +14,7 @@ type thisProps = {
* @returns setRtnData => 선택된 주소 데이터 반환
*/
export default function SearchInputAddress({
initValue = undefined,
initValue ,
setRtnData = () => {},
readonly=false
}: thisProps) {
@@ -24,6 +24,13 @@ export default function SearchInputAddress({
const [searchList, setSearchList] = useState<addressType[]>([]);
useEffect(()=>{
if(initValue !== textValue && initValue !== undefined && initValue !== null && initValue !== ''){
setTextValue(initValue)
}
},[initValue])
const wrapperRef = useRef<HTMLDivElement>(null);
const handleInputChange = useCallback(
(e: React.ChangeEvent<HTMLInputElement>) => {