Compare commits
2 Commits
ef972153c6
...
45bcba0f77
| Author | SHA1 | Date |
|---|---|---|
|
|
45bcba0f77 | |
|
|
2b7da6d088 |
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "zy-react-library",
|
"name": "zy-react-library",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.1.2",
|
"version": "1.1.3",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "",
|
"description": "",
|
||||||
"author": "LiuJiaNan",
|
"author": "LiuJiaNan",
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,17 @@ const FormBuilder = (props) => {
|
||||||
const timer = setTimeout(() => {
|
const timer = setTimeout(() => {
|
||||||
getPageWidth();
|
getPageWidth();
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
|
if (showActionButtons) {
|
||||||
window.addEventListener("resize", getPageWidth);
|
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();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue