Skip to content

Commit 7b0765c

Browse files
Copilothotlong
andcommitted
fix: address code review — remove unreachable Date check, improve LookupFilterDef docs
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent a884191 commit 7b0765c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/fields/src/widgets/RecordPickerDialog.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,6 @@ export function RecordPickerDialog({
338338
const getCellValue = useCallback((record: any, field: string): string => {
339339
const val = record[field];
340340
if (val === null || val === undefined) return '';
341-
if (val instanceof Date) return val.toLocaleDateString();
342341
if (typeof val === 'object') {
343342
// Handle MongoDB types / expanded references
344343
if (val.$numberDecimal) return String(Number(val.$numberDecimal));

packages/types/src/field-types.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,16 @@ export interface LookupColumnDef {
364364
/**
365365
* Filter condition for the Record Picker dialog.
366366
* Applied as a base filter on every query — restricts which records are selectable.
367+
*
368+
* Operator compatibility:
369+
* - `eq`, `ne` — all data types
370+
* - `gt`, `lt`, `gte`, `lte` — numbers, dates
371+
* - `contains` — strings
372+
* - `in`, `notIn` — arrays of values (select/lookup fields)
373+
*
367374
* @example { field: 'status', operator: 'eq', value: 'active' }
375+
* @example { field: 'created_at', operator: 'gte', value: '2024-01-01' }
376+
* @example { field: 'category', operator: 'in', value: ['A', 'B'] }
368377
*/
369378
export interface LookupFilterDef {
370379
/** Field name to filter on */

0 commit comments

Comments
 (0)