mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 17:46:18 +08:00
refactor(editor): simplify TOC implementation with signal and context (#9873)
### What Changes 1. Used `@preact/signal` and `@lit/context` to simplify repetitive passing of properties of TOC components, 2. Fixed TOC invalid when editor changed, such as click new page button.
This commit is contained in:
@@ -199,6 +199,7 @@ export const dragTo = async (
|
||||
};
|
||||
|
||||
// sometimes editor loses focus, this function is to focus the editor
|
||||
// FIXME: this function is not usable since the placeholder is not unstable
|
||||
export const focusInlineEditor = async (page: Page) => {
|
||||
await page
|
||||
.locator(
|
||||
|
||||
Reference in New Issue
Block a user