Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

[fields] lookup 记录选择器筛选面板:select 类型筛选项不带 options,下拉为空 #3336

Closed

Description

@baozhoutao

症状

lookup「浏览全部记录」记录选择器的筛选面板(Filters)中,由 typed picker columns 派生的 select 类型筛选项没有 options,下拉展开为空,无法筛选。

定位

  • packages/fields/src/widgets/LookupField.tsx 的 filterColumns useMemo:对 c.type === 'select' 的列 push { field, label, type: 'select' },不带 options;
  • packages/fields/src/widgets/RecordPickerDialog.tsx 的 renderFilterInput select 分支渲染 col.options?.map(...) —— undefined 时 SelectContent 为空。

期望

派生 select 筛选项时从引用对象 schema 的字段定义取 options(#3333 之后 LookupField 已持有 refObjectSchema,列渲染已走 fieldsMeta 富化,筛选面板可复用同一来源,并过 i18n option 翻译)。

备注

与 #3333(选择器 select 列不解析 label,已修列渲染)同族但不同面:那是表格单元格,这里是筛选面板输入控件。

Activity

  1. self-assigned this
    on Aug 6, 2026
  2. yinlianghui commented on Aug 6, 2026

    @yinlianghui
    Contributor

    认领:objectui 分片 PM 并行批第 24 单(#3365/PR #3396 已落地,RecordPickerDialog 释放;三单同批)
    会话:session_01GTRjn8xBqp75dk7kFupVRt
    分支:claude/issue-3336-picker-filter-options
    Worktree:objectui-issue-3336
    域:objectui 分片(fields)
    文件面:packages/fields/src/widgets/LookupField.tsx(filterColumns)、packages/fields/src/widgets/RecordPickerDialog.tsx(renderFilterInput)+ 相应测试 + .changeset/*.md。同批:#5506、#3375 —— 零相交;⚠️ #3365(labelField 透传)与 #3333(列渲染)今日均已合,同文件行号有漂移,以当前 origin/main 为准。

    口径照正文:派生 select 筛选项从 refObjectSchema 的字段定义取 options(复用 #3333 的 fieldsMeta 富化来源),过 i18n option 翻译;测试覆盖有 options 渲染、无 options 字段回退、翻译生效。


    Generated by Claude Code

  3. yinlianghui commented on Aug 6, 2026

    @yinlianghui
    Contributor

    验收:ACCEPT → PR #3421(并行批第 24 单,会话 session_01GTRjn8xBqp75dk7kFupVRt),CI 16/16 绿,已转 ready + auto-merge。

    已复核 diff 与报告一致,三点值得记录:

    1. 改法与 issue 定位不同但更优,予以确认:issue 指向 LookupField.filterColumns 补 options,dev 改为在 RecordPickerDialog 内抽 resolveSchemaOptions,单元格描述符([console] lookup「浏览全部记录」记录选择器:select 字段列不解析选项 label,显示首字母大写的裸 value(manufacturing → Manufacturing) #3333 路径,行为不变)与筛选列共用同一个 resolver + 同一条 i18n option 翻译。LookupField 零改动。这消除了"两份派生各自漂移"的结构性风险——最吃重的用例正是钉这一点:zh provider 下筛选项 label 与同字段单元格必须是同一个翻译串。
    2. 边界取舍符合 AGENTS.md #0.1:schema 无 options 的 select 保持空下拉(不从当页记录现编选项);显式 options(含 lookup_filters in/notIn 派生)优先不被放宽。两条均以 no-op pin 钉住,且测试诚实标注"修复前后都绿",未当复现邀功。
    3. 反向验证:stash 修复只留测试 → 5 红 2 绿,与预判完全一致;消费半径扫过 RelatedList / AccessExplainPanel / AssignedUsersSection 三个调用方。

    顺带发现 #3422(select 筛选值一律字符串下发,lookup_filters 数字/布尔选项筛空)已单独立单,本轮分诊。


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugpm:dispatchedpm:queue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions