Skip to content

Commit ac42289

Browse files
author
Suhan Moon
committed
콘솔제거
1 parent 30f8031 commit ac42289

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ width, height값을 별도로 줄 수 있습니다.
104104
프로젝트 문의 혹은 제휴가 필요한 경우 [email protected]로 연락주세요.
105105

106106
# Changes
107+
- 0.9.8
108+
- onClose 이벤트 제거
109+
- 웹에서 가끔 하단에 툭 튀어나오는 장애 처리
107110
- 0.9.6
108111
- onClose 이벤트 추가
109112
- 0.9.4

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@actbase/react-daum-postcode",
3-
"version": "0.9.6",
3+
"version": "0.9.8",
44
"description": "다음 우편번호찾기 for React, React-Native",
55
"main": "lib/index.js",
66
"module": "lib/index.js",
@@ -9,6 +9,7 @@
99
"build:src": "rm -rf ./lib && tsc -p src/tsconfig.json && babel lib --out-dir lib",
1010
"build": "npm run build:src ",
1111
"prepublish": "npm run build",
12+
"localinstall": "npm run build && rm -rf /Users/suhanmoon/Projects/bankmall/bankmall-front/node_modules/@actbase/react-daum-postcode/lib && cp -r ./lib /Users/suhanmoon/Projects/bankmall/bankmall-front/node_modules/@actbase/react-daum-postcode",
1213
"test": "echo \"Error: no test specified\" && exit 1"
1314
},
1415
"repository": {

src/app.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const getJSApi = (): Promise<any> => {
2222
});
2323
};
2424

25-
const Postcode: React.FC<PostcodeProps> = ({ onSelected, onClose, jsOptions, style }) => {
25+
const Postcode: React.FC<PostcodeProps> = ({ onSelected, jsOptions, style }) => {
2626
const layer = React.useRef<HTMLDivElement>(null);
2727

2828
const loadData = React.useCallback(async () => {
@@ -32,23 +32,19 @@ const Postcode: React.FC<PostcodeProps> = ({ onSelected, onClose, jsOptions, sty
3232
new window.daum.Postcode({
3333
...jsOptions,
3434
oncomplete: function(data: OnCompleteParams) {
35-
console.log('oncomplete');
3635
onSelected(data);
3736
},
38-
onclose:
39-
onClose ||
40-
function() {
41-
if (layer.current) {
42-
loadData();
43-
}
44-
},
45-
}).embed(layer.current);
37+
onclose: function() {
38+
loadData();
39+
},
40+
}).embed(layer.current, { autoClose: false });
4641
}
4742
}, []);
4843

4944
React.useEffect(() => {
5045
loadData().catch(console.warn);
5146
}, [loadData]);
47+
5248
// @ts-ignore
5349
return <div ref={layer} style={style} />;
5450
};

src/types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,6 @@ export interface PostcodeProps {
387387
*/
388388
onSelected: (data: OnCompleteParams) => void;
389389

390-
onClose: () => void;
391-
392390
/**
393391
* onSelected 함수에서 오류 발생 시 실행되는 함수입니다.
394392
*/

0 commit comments

Comments
 (0)