mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-22 00:37:05 +08:00
feat(editor): add block meta for table block (#10915)
This commit is contained in:
@@ -6,6 +6,8 @@ import {
|
||||
defineBlockSchema,
|
||||
} from '@blocksuite/store';
|
||||
|
||||
import type { BlockMeta } from '../../utils/types';
|
||||
|
||||
export type TableCell = {
|
||||
text: Text;
|
||||
};
|
||||
@@ -23,7 +25,7 @@ export interface TableColumn {
|
||||
width?: number;
|
||||
}
|
||||
|
||||
export interface TableBlockProps {
|
||||
export interface TableBlockProps extends BlockMeta {
|
||||
rows: Record<string, TableRow>;
|
||||
columns: Record<string, TableColumn>;
|
||||
// key = `${rowId}:${columnId}`
|
||||
@@ -50,6 +52,10 @@ export const TableBlockSchema = defineBlockSchema({
|
||||
rows: {},
|
||||
columns: {},
|
||||
cells: {},
|
||||
'meta:createdAt': undefined,
|
||||
'meta:createdBy': undefined,
|
||||
'meta:updatedAt': undefined,
|
||||
'meta:updatedBy': undefined,
|
||||
}),
|
||||
metadata: {
|
||||
isFlatData: true,
|
||||
|
||||
Reference in New Issue
Block a user