[WIKI-331] fix: editor ref issues while locking/unlocking page #6965
This commit is contained in:
parent
b54f54999e
commit
797f150ec4
2 changed files with 7 additions and 1 deletions
|
|
@ -74,6 +74,12 @@ export const PageRoot = observer((props: TPageRootProps) => {
|
|||
[page.editorRef, setEditorRef]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
setEditorRef(editorRef.current);
|
||||
}, 0);
|
||||
}, [isContentEditable, setEditorRef]);
|
||||
|
||||
const version = searchParams.get("version");
|
||||
useEffect(() => {
|
||||
if (!version) {
|
||||
|
|
|
|||
|
|
@ -250,10 +250,10 @@ export class ProjectPageStore implements IProjectPageStore {
|
|||
});
|
||||
|
||||
const page = await this.service.fetchById(workspaceSlug, projectId, pageId);
|
||||
const pageInstance = page?.id ? this.getPageById(page.id) : undefined;
|
||||
|
||||
runInAction(() => {
|
||||
if (page?.id) {
|
||||
const pageInstance = this.getPageById(page.id);
|
||||
if (pageInstance) {
|
||||
pageInstance.mutateProperties(page, false);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue