diff --git a/packages/react-notion-x/src/block.tsx b/packages/react-notion-x/src/block.tsx index 37fe13d8a..7c0ea5d0c 100644 --- a/packages/react-notion-x/src/block.tsx +++ b/packages/react-notion-x/src/block.tsx @@ -786,28 +786,44 @@ export function Block(props: BlockProps) { const tableBlock = recordMap.block[block.parent_id] ?.value as types.TableBlock const order = tableBlock.format?.table_block_column_order - const formatMap = tableBlock.format?.table_block_column_format - const backgroundColor = block.format?.block_color if (!tableBlock || !order) { return null } + const rowIndex = recordMap.block[block.parent_id]?.value.content?.indexOf( + block.id + ) + const formatMap = tableBlock.format?.table_block_column_format + const hasColumnHeader = Boolean( + tableBlock.format?.table_block_column_header + ) + const isRowHeader = + Boolean(tableBlock.format?.table_block_column_header) && rowIndex === 0 + const backgroundColor = block.format?.block_color + return (