There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix: hide groupBy tag at kanban
lawvs1dfb241eee6c
diff --git a/libs/components/editor-core/src/block-pendant/pendant-render/PandentRender.tsx b/libs/components/editor-core/src/block-pendant/pendant-render/PandentRender.tsxindex ea45524f86..a9e89f4fad 100644--- a/libs/components/editor-core/src/block-pendant/pendant-render/PandentRender.tsx+++ b/libs/components/editor-core/src/block-pendant/pendant-render/PandentRender.tsx@@ -1,15 +1,20 @@-import React, { useRef, useState } from 'react';-import { AsyncBlock } from '../../editor';-import { getRecastItemValue, useRecastBlockMeta } from '../../recast-block';import {MuiZoom,Popover,PopperHandler,styled,} from '@toeverything/components/ui';-import { PendantTag } from '../PendantTag';-import { UpdatePendantPanel } from '../pendant-operation-panel';+import { useRef, useState } from 'react';+import { AsyncBlock } from '../../editor';+import {+ getRecastItemValue,+ RecastScene,+ useCurrentView,+ useRecastBlockMeta,+} from '../../recast-block';import { AddPendantPopover } from '../AddPendantPopover';+import { UpdatePendantPanel } from '../pendant-operation-panel';+import { PendantTag } from '../PendantTag';export const PendantRender = ({ block }: { block: AsyncBlock }) => {const popoverHandlerRef = useRef<{ [key: string]: PopperHandler }>({});@@ -17,7 +22,8 @@ export const PendantRender = ({ block }: { block: AsyncBlock }) => {const [showAddBtn, setShowAddBtn] = useState(false);const { getProperties } = useRecastBlockMeta();-+ const [currentView] = useCurrentView();+ const isKanbanView = currentView.type === RecastScene.Kanban;const { getValue, removeValue } = getRecastItemValue(block);const properties = getProperties();@@ -41,6 +47,11 @@ export const PendantRender = ({ block }: { block: AsyncBlock }) => {return null;}+ // Hide the groupBy pendant at kanban view+ if (isKanbanView && currentView.groupBy === property.id) {+ return null;+ }+const { id } = value;return (