fix(core): title could not be changed when creating a new doc (#8203)

Before change, the title could not be modified from outside the editor without refreshing:

https://github.com/user-attachments/assets/536acba1-4e31-418a-bc1a-8578e3128bba

after:

https://github.com/user-attachments/assets/30a4b270-b8b1-4787-acef-0ab2a72a8f74
This commit is contained in:
JimmFly
2024-09-12 07:55:22 +00:00
parent cc5a6e6d40
commit 2cba8a4ccd
27 changed files with 138 additions and 145 deletions

View File

@@ -62,7 +62,7 @@ const DetailPageImpl = () => {
const { openPage, jumpToPageBlock, jumpToTag } = useNavigateHelper();
const editorContainer = useLiveData(editor.editorContainer$);
const { setDocReadonly } = useDocMetaHelper(workspace.docCollection);
const { setDocReadonly } = useDocMetaHelper();
// TODO(@eyhn): remove jotai here
const [_, setActiveBlockSuiteEditor] = useActiveBlocksuiteEditor();

View File

@@ -22,9 +22,7 @@ import { MobileSignInModal } from '../views/sign-in/modal';
export function MobileCurrentWorkspaceModals() {
const currentWorkspace = useService(WorkspaceService).workspace;
const { trashModal, setTrashModal, handleOnConfirm } = useTrashModalHelper(
currentWorkspace.docCollection
);
const { trashModal, setTrashModal, handleOnConfirm } = useTrashModalHelper();
const deletePageTitles = trashModal.pageTitles;
const trashConfirmOpen = trashModal.open;
const onTrashConfirmOpenChange = useCallback(