Skip to content

Commit

Permalink
fix: portal auto resize
Browse files Browse the repository at this point in the history
  • Loading branch information
sprocketc authored and logseq-cldwalker committed Mar 13, 2023
1 parent 7a889a0 commit 7ea26ed
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -292,6 +292,15 @@ export class LogseqPortalShape extends TLBoxShape<LogseqPortalShapeProps> {

const [loaded, setLoaded] = React.useState(false)

React.useEffect(() => {
if (!this.initialHeightCalculated) {
setTimeout(() => {
this.onResetBounds()
app.persist(true)
})
}
}, [this.initialHeightCalculated])

React.useEffect(() => {
setTimeout(function () {
setLoaded(true)
Expand Down

0 comments on commit 7ea26ed

Please sign in to comment.