Compare commits

..

No commits in common. "45bcba0f77ee101a42be66c4fd269be4e4f35381" and "ef972153c61fe3990eea6e084b664dabfed5d5df" have entirely different histories.

2 changed files with 4 additions and 9 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "zy-react-library", "name": "zy-react-library",
"private": false, "private": false,
"version": "1.1.3", "version": "1.1.2",
"type": "module", "type": "module",
"description": "", "description": "",
"author": "LiuJiaNan", "author": "LiuJiaNan",

View File

@ -37,17 +37,12 @@ const FormBuilder = (props) => {
const timer = setTimeout(() => { const timer = setTimeout(() => {
getPageWidth(); getPageWidth();
}, 0); }, 0);
window.addEventListener("resize", getPageWidth);
if (showActionButtons) {
window.addEventListener("resize", getPageWidth);
}
return () => { return () => {
if (showActionButtons) { window.removeEventListener("resize", getPageWidth);
window.removeEventListener("resize", getPageWidth);
}
clearTimeout(timer); clearTimeout(timer);
}; };
}, [showActionButtons]); }, []);
const handleCancel = () => { const handleCancel = () => {
window.history.back(); window.history.back();