You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add tests and documentation for RecordPickerDialog and LookupField upgrade
- Add 15 comprehensive tests for RecordPickerDialog and LookupField two-level interaction
- Update CHANGELOG.md with new features
- Update ROADMAP.md with Record Picker milestone
- Update lookup.mdx documentation with Record Picker section and new schema fields
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
### Added
11
+
12
+
-**RecordPickerDialog Component** (`@object-ui/fields`): New enterprise-grade record selection dialog with multi-column table display, pagination, search, loading/error/empty states, and single/multi-select support. Provides the foundation for Salesforce-style Lookup experience.
13
+
-**LookupField Two-Level Interaction** (`@object-ui/fields`): LookupField now supports a "Show All Results" button in the quick-select dialog that opens the full RecordPickerDialog with table view, pagination, and multi-column display.
14
+
-**LookupFieldMetadata Schema Enhancement** (`@object-ui/types`): Added `lookup_columns`, `description_field`, `lookup_page_size` properties to `LookupFieldMetadata` for configuring the Record Picker display. New `LookupColumnDef` interface for typed column definitions.
15
+
10
16
### Changed
11
17
12
18
-**@objectstack v3.2.6 Upgrade**: Upgraded all `@objectstack/*` packages from `^3.2.5` to `^3.2.6` across 13 package.json files (43 references)
// Custom page size for the Record Picker dialog (default: 10)
85
+
lookup_page_size?: number;
76
86
}
77
87
78
88
interface LookupOption {
@@ -106,6 +116,38 @@ The popup will:
106
116
2. Send `$search` queries with 300ms debounce as the user types
107
117
3. Show loading spinner, error state with retry, and empty state
108
118
4. Display "Showing X of Y" when more records exist than the page size
119
+
5. Show a **"Show All Results"** button to open the full Record Picker dialog
120
+
121
+
## Record Picker Dialog (Enterprise)
122
+
123
+
When more results are available than displayed in the quick-select popup, a **"Show All Results"** button opens the full **RecordPickerDialog** — an enterprise-grade record selection experience.
124
+
125
+
```plaintext
126
+
// Configure the Record Picker with lookup_columns
127
+
{
128
+
type: 'lookup',
129
+
name: 'order',
130
+
label: 'Order',
131
+
reference_to: 'orders',
132
+
reference_field: 'order_number',
133
+
description_field: 'customer_name',
134
+
lookup_columns: [
135
+
{ field: 'order_number', label: 'Order #' },
136
+
{ field: 'customer_name', label: 'Customer' },
137
+
{ field: 'total_amount', label: 'Amount' },
138
+
{ field: 'status', label: 'Status' },
139
+
],
140
+
lookup_page_size: 15,
141
+
}
142
+
```
143
+
144
+
The Record Picker dialog provides:
145
+
-**Multi-column table** with configurable columns via `lookup_columns`
146
+
-**Search** with debounced server-side querying
147
+
-**Pagination** with page-by-page navigation
148
+
-**Single/Multi-select** with visual check indicators
149
+
-**Loading, error, and empty states**
150
+
- Auto-inferred columns from `reference_field` when `lookup_columns` is not set
109
151
110
152
## Lookup vs Master-Detail
111
153
@@ -133,12 +175,15 @@ import { LookupCellRenderer } from '@object-ui/fields';
133
175
134
176
## Features
135
177
178
+
-**Two-Level Interaction**: Quick-select popup + full Record Picker dialog
179
+
-**Record Picker Dialog**: Enterprise-grade table with multi-column, pagination, search
136
180
-**Dynamic DataSource Loading**: Automatically fetches records from referenced objects
137
181
-**Search**: Debounced type-ahead search with `$search` parameter
138
182
-**Multi-Select**: Support for multiple references
139
183
-**Keyboard Navigation**: Arrow keys to navigate, Enter to select
140
184
-**Loading/Error/Empty States**: Friendly feedback for all states
141
185
-**Secondary Field Display**: Show description/subtitle per option
142
186
-**Quick-Create Entry**: Optional "Create new" button when no results
143
-
-**Pagination Hint**: Shows total count when more results available
187
+
-**Configurable Columns**: `lookup_columns` for multi-column picker display
188
+
-**Pagination**: Page-by-page navigation in Record Picker dialog
144
189
-**Backward Compatible**: Falls back to static options when no DataSource
0 commit comments