hotfix: auto set height
This commit is contained in:
parent
9f0e16b045
commit
47b33f2b17
|
@ -37,10 +37,12 @@ export function HTMLPreview(props: {
|
|||
const { id, height, title } = e.data;
|
||||
setTitle(title);
|
||||
if (id == frameId.current) {
|
||||
setIframeHeight(height);
|
||||
if (height != iframeHeight + 40) {
|
||||
setIframeHeight(height);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, []);
|
||||
}, [iframeHeight]);
|
||||
|
||||
const height = useMemo(() => {
|
||||
const parentHeight = props.height || 600;
|
||||
|
|
Loading…
Reference in New Issue