Skip to content

fix(select): handle boolean option values - #1047

Merged
winixt merged 1 commit into
WeBankFinTech:mainfrom
daflyinbed:codex/fix-select-boolean-hover-1046
Oct 23, 2026
Merged

winixt merged 1 commit into
WeBankFinTech:mainfrom
daflyinbed:codex/fix-select-boolean-hover-1046

Conversation

@daflyinbed

@daflyinbed daflyinbed commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Related issue (if exists):

Closes #1046

Other information:

FSelect 的选项值为 true / false 时,打开下拉框或悬停选项会出现 hoverOptionValue 的 Vue 属性类型警告。内部 OptionList 现接受 Boolean,并显式保留 undefined 默认值,避免未悬停时误高亮 false 选项。

同时将选中状态判断中的空值回退改为 ??,修复 false 被当成空值而无法显示勾选高亮的问题。新增回归测试覆盖空选项值初始化、两种布尔值的回显/悬停/Enter 选择、事件值类型以及未传悬停值的行为。

验证:

  • pnpm exec vitest run components/select components/select-trigger:17 个测试文件、212 项测试全部通过。修复前新增测试中的 3 项失败,复现属性警告及 false 选中高亮问题。
  • Chrome 155 实际交互:单选点击 true,悬停 false 后 Enter 选择,初始 false 的勾选高亮,多选添加 true / false 并取消 false;值和 change 事件保持布尔类型,控制台无 warning/error。
  • git diff --check 通过。
  • 修改文件的 ESLint 除 style/indent 外全部通过。optionList.tsx 在上游基线已有 47 项缩进错误,与修复后的诊断逐项一致;本 PR 保留原有格式,未引入新的 lint 问题。
  • 提交包含 DCO Signed-off-by。
  • 上游 Code Review 首次运行 未获取到 OPENAI_API_KEY,尝试发布提示评论时又收到 403 Resource not accessible by integration,需要上游处理工作流的密钥/权限配置。

Accept boolean hover values without prop warnings and preserve false when
checking the selected option. Keep an omitted hover value undefined.

Closes WeBankFinTech#1046

Signed-off-by: xwbx <1677759063@qq.com>
@daflyinbed
daflyinbed force-pushed the codex/fix-select-boolean-hover-1046 branch from 49cb524 to ba0c08a Compare October 13, 2026 03:34
@winixt
winixt merged commit 6e80739 into WeBankFinTech:main Oct 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FSelect 的options value如果用boolean类型的会导致抛错 Invalid prop: type check failed for prop "hoverOptionValue".

2 participants