Skip to content

Commit 5164cba

Browse files
committed
fix: empty group title for board view
1 parent f9d00b3 commit 5164cba

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ function Board({ collectionView, collectionData, collection, padding }) {
6666
collectionView?.format?.board_groups2 ||
6767
[]
6868

69-
const boardGroupBy = collectionView?.format?.board_columns_by?.groupBy
70-
7169
const boardStyle = React.useMemo(
7270
() => ({
7371
paddingLeft: padding
@@ -106,18 +104,13 @@ function Board({ collectionView, collectionData, collection, padding }) {
106104
{group.value?.value ? (
107105
<Property
108106
schema={schema}
109-
data={[
110-
[
111-
group.value?.value[boardGroupBy] ||
112-
group.value?.value
113-
]
114-
]}
107+
data={[[group.value?.value]]}
115108
collection={collection}
116109
/>
117110
) : (
118111
<span>
119112
<EmptyIcon className='notion-board-th-empty' />
120-
{`No ${schema.name}` || 'No Select'}
113+
{schema?.name ? `No ${schema.name}` : 'No Select'}
121114
</span>
122115
)}
123116

0 commit comments

Comments
 (0)