fix(core): search feature not working (#3902)

This commit is contained in:
Alex Yang
2023-08-22 19:38:02 -05:00
committed by GitHub
parent c7a4805e5c
commit 3b6e145b23
26 changed files with 288 additions and 250 deletions

View File

@@ -3,10 +3,10 @@ import type { Page } from '@blocksuite/store';
/**
* @deprecated
*/
export async function initEmptyPage(page: Page) {
export async function initEmptyPage(page: Page, title?: string) {
await page.waitForLoaded();
const pageBlockId = page.addBlock('affine:page', {
title: new page.Text(''),
title: new page.Text(title || ''),
});
page.addBlock('affine:surface', {}, pageBlockId);
const noteBlockId = page.addBlock('affine:note', {}, pageBlockId);