mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 14:28:51 +08:00
Merge pull request #678 from toeverything/0106/surface
feat: compat with surface block structure
This commit is contained in:
@@ -17,7 +17,7 @@ export const usePropsUpdated: UsePropsUpdated = () => {
|
||||
return;
|
||||
}
|
||||
setTimeout(() => {
|
||||
editor.model?.propsUpdated.on(() => {
|
||||
editor.pageBlockModel?.propsUpdated.on(() => {
|
||||
callbackQueue.current.forEach(callback => {
|
||||
callback(editor);
|
||||
});
|
||||
@@ -26,7 +26,7 @@ export const usePropsUpdated: UsePropsUpdated = () => {
|
||||
|
||||
return () => {
|
||||
callbackQueue.current = [];
|
||||
editor?.model?.propsUpdated.dispose();
|
||||
editor?.pageBlockModel?.propsUpdated?.dispose();
|
||||
};
|
||||
}, [editor]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user