주소 자동 완성 input 초기값 설정
This commit is contained in:
@@ -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>) => {
|
||||
|
||||
Reference in New Issue
Block a user