Skip to content

Commit 049f568

Browse files
Merge pull request NotionX#408 from wustep/master
2 parents 1cfefb9 + 7776138 commit 049f568

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"repository": "NotionX/react-notion-x",
66
"author": "Travis Fischer <[email protected]>",
77
"license": "MIT",
8+
"version": "6.15.8",
89
"engines": {
910
"node": ">=12"
1011
},

packages/notion-types/src/collection.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,6 @@ export interface Collection {
4747
property: PropertyID
4848
visibility: 'show' | 'hide'
4949
}>
50+
hide_linked_collection_name?: boolean
5051
}
5152
}

packages/react-notion-x/src/third-party/collection.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ const CollectionViewBlock: React.FC<{
175175
}
176176

177177
const title = getTextContent(collection.name).trim()
178+
const showTitle =
179+
collectionView.format?.hide_linked_collection_name !== true && title
178180
if (collection.icon) {
179181
block.format = {
180182
...block.format,
@@ -194,9 +196,8 @@ const CollectionViewBlock: React.FC<{
194196
/>
195197
)}
196198
</div>
197-
<div className='notion-collection-header'>
198-
{/*TODO: only show if no full DB*/}
199-
{title && (
199+
{showTitle && (
200+
<div className='notion-collection-header'>
200201
<div className='notion-collection-header-title'>
201202
<PageIcon
202203
block={block}
@@ -205,8 +206,8 @@ const CollectionViewBlock: React.FC<{
205206
/>
206207
{title}
207208
</div>
208-
)}
209-
</div>
209+
</div>
210+
)}
210211
</div>
211212
<div className={cs('notion-collection', className)}>
212213
<CollectionView

0 commit comments

Comments
 (0)