-
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Add support for relation fields that allow users to view and navigate to related records from parent tables.
Features
- Display relation fields as interactive dropdowns
- Show list of related records from the linked table
- Provide "Open in table" action to navigate to filtered view
- Auto-apply filter using parent record's ID
Example: Chat Messages Relation
Clicking messages relation field in chats table:
- Dropdown shows all messages belonging to that chat
- "Open in table" button available
- Opens
messagestable with filter:chatId = '5a3f2b...'
Detailed Flow
chats table (parent)
└── messages relation field
├── Shows: "Hello there!", "How are you?", "See you soon!"
└── Click "Open in table"
→ Opens messages table
→ Filter applied: WHERE chatId = '5a3f2b1c-4d5e-6f7g-8h9i...'
Flow Diagram
┌─────────────────────────────────┐
│ chats Table │
│ ┌─────────────────┬──────────┐ │
│ │ Chat Name │ messages │ │
│ ├─────────────────┼──────────┤ │
│ │ Team Discussion │ ▼ │◄┼─── Click relation field
│ └─────────────────┴──────────┘ │
└──────────────┬──────────────────┘
│
▼
┌───────────────────────────────────────┐
│ Dropdown Menu (Preview) │
│ ┌─────────────────────────────────┐ │
│ │ • "Hello there!" - Alice │ │
│ │ • "How are you?" - Bob │ │
│ │ • "See you soon!" - Charlie │ │
│ │ • "Thanks everyone" - Alice │ │
│ │ │ │
│ │ (147 messages total) │ │
│ ├─────────────────────────────────┤ │
│ │ [📖 Open in table] ──────────►│ │
│ └─────────────────────────────────┘ │
└───────────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────┐
│ messages Table (Filtered) │
│ WHERE chatId = '5a3f2b1c-4d5e-6f7g...' │
│ Active Filter: chatId equals "Team Discussion" │
│ ┌────┬─────────────────┬────────┬──────────┐ │
│ │ id │ content │ sender │ created │ │
│ ├────┼─────────────────┼────────┼──────────┤ │
│ │ 1 │ Hello there! │ Alice │ 10:23 AM │ │
│ │ 2 │ How are you? │ Bob │ 10:25 AM │ │
│ │ 3 │ See you soon! │ Charlie│ 10:30 AM │ │
│ │ 4 │ Thanks everyone │ Alice │ 10:32 AM │ │
│ └────┴─────────────────┴────────┴──────────┘ │
└──────────────────────────────────────────────────┘
Nested Relations Example
users table
└── chats relation (user's chats)
└── messages relation (chat's messages)
└── attachments relation (message's files)
Navigation path:
users → filter chats by userId
→ filter messages by chatId
→ filter attachments by messageId
Acceptance Criteria
- Relation fields render as interactive dropdowns
- Dropdown shows preview of related records (e.g., first few messages)
- Display record count in dropdown (e.g., "147 messages total")
- "Open in table" action navigates to related table
- Automatic filter applied using parent record ID
- Filter is visible and editable in target table
- Support for nested relations (e.g., user → chats → messages → attachments)
- Handle empty relations gracefully (show "No messages" state)
Reactions are currently unavailable