Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

fix: fix jump error issue (#6374)

Kilu.Hebea4b60a7a62
diff --git a/frontend/appflowy_web_app/src/components/database/components/cell/relation/RelationItems.tsx b/frontend/appflowy_web_app/src/components/database/components/cell/relation/RelationItems.tsx
index e01f84b8c1..5bff2a2a74 100644
--- a/frontend/appflowy_web_app/src/components/database/components/cell/relation/RelationItems.tsx
+++ b/frontend/appflowy_web_app/src/components/database/components/cell/relation/RelationItems.tsx
@@ -122,12 +122,18 @@ function RelationItems ({ style, cell, fieldId }: {
onClick={async (e) => {
if (!relatedViewId) return;
e.stopPropagation();
- if (navigateToRow) {
- navigateToRow(rowId);
- return;
- }
-
+
try {
+ if (navigateToRow) {
+ if (relatedViewId !== viewId) {
+ await navigateToView?.(relatedViewId);
+ return;
+ }
+
+ navigateToRow(rowId);
+ return;
+ }
+
await navigateToView?.(relatedViewId);
// eslint-disable-next-line
} catch (e: any) {