Repository navigation
fix(select): handle boolean option values - #1047
Merged
winixt merged 1 commit intoOct 23, 2026
Merged
Conversation
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
force-pushed
the
codex/fix-select-boolean-hover-1046
branch
from
October 13, 2026 03:34
49cb524 to
ba0c08a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
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选中高亮问题。true,悬停false后 Enter 选择,初始false的勾选高亮,多选添加true/false并取消false;值和 change 事件保持布尔类型,控制台无 warning/error。git diff --check通过。style/indent外全部通过。optionList.tsx在上游基线已有 47 项缩进错误,与修复后的诊断逐项一致;本 PR 保留原有格式,未引入新的 lint 问题。Signed-off-by。OPENAI_API_KEY,尝试发布提示评论时又收到403 Resource not accessible by integration,需要上游处理工作流的密钥/权限配置。