mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
fix: history on create portal
This commit is contained in:
committed by
Gabriel Horner
parent
cff17ab891
commit
6657286c4f
@@ -276,6 +276,7 @@ export class LogseqPortalShape extends TLBoxShape<LogseqPortalShapeProps> {
|
||||
return null // not being correctly configured
|
||||
}
|
||||
const { Page, Block } = renderers
|
||||
const [loaded, setLoaded] = React.useState(false)
|
||||
|
||||
React.useEffect(() => {
|
||||
if (this.props.isAutoResizing) {
|
||||
@@ -285,13 +286,12 @@ export class LogseqPortalShape extends TLBoxShape<LogseqPortalShapeProps> {
|
||||
this.update({
|
||||
size: [this.props.size[0], newHeight],
|
||||
})
|
||||
app.persist(true)
|
||||
|
||||
if (loaded) app.persist(true)
|
||||
}
|
||||
}
|
||||
}, [innerHeight, this.props.isAutoResizing])
|
||||
|
||||
const [loaded, setLoaded] = React.useState(false)
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!this.initialHeightCalculated) {
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user