mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix(core): clicking change mode in the menu should switch both view and mode (#8562)
close AF-1524
This commit is contained in:
@@ -150,6 +150,7 @@ export const PageHeaderMenuButton = ({
|
||||
|
||||
const handleSwitchMode = useCallback(() => {
|
||||
const mode = primaryMode === 'page' ? 'edgeless' : 'page';
|
||||
editorService.editor.setMode(mode);
|
||||
editorService.editor.doc.setPrimaryMode(mode);
|
||||
track.$.header.docOptions.switchPageMode({
|
||||
mode,
|
||||
|
||||
Reference in New Issue
Block a user