mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-23 21:06:22 +08:00
refactor(core): move block collection to affine and implement as doc (#9514)
This commit is contained in:
@@ -33,7 +33,7 @@ export class DataViewBlockModel extends BlockModel<Props> {
|
||||
}
|
||||
|
||||
duplicateView(id: string): string {
|
||||
const newId = this.doc.generateBlockId();
|
||||
const newId = this.doc.collection.idGenerator();
|
||||
this.doc.transact(() => {
|
||||
const index = this.views.findIndex(v => v.id === id);
|
||||
const view = this.views[index];
|
||||
|
||||
Reference in New Issue
Block a user