Repository navigation
fix(checkbox): clean up group value registration - #894
Merged
selicens merged 2 commits intoSep 17, 2026
Merged
Conversation
|
@yunfeizhu is attempting to deploy a commit to the aibayanyu20's projects Team on Vercel. A member of the Team first needs to authorize it. |
antdv-next
@antdv-next/cssinjs
commit: |
Size Report
|
ffgenius
approved these changes
Sep 16, 2026
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.
🤔 本次变更属于 ...
🔗 相关 Issue
Fixes #893
💡 背景与方案
CheckboxGroup初始选中 A,移除 A 后再勾选 B,change和update:value仍会返回["A", "B"],而不是["B"]。使用options或条件渲染的 Checkbox 子项时均可复现。目前初始值在 watcher 外注册,而卸载清理只在非 immediate 的 watcher 回调中设置。若
value和skipGroup没有变化,组件卸载时便不会注销初始值。将注册与清理统一到 immediate watcher 中,清理时使用该次注册的值。这样首次挂载、
value变化、skipGroup切换和卸载都能正确维护分组成员。移除选项本身不会主动改写父组件的受控值;后续用户操作触发的事件会过滤掉已移除的值。验证:
git diff --check、antdv-next ESM 与声明文件构建通过。change和v-model:value均为["B"]。📝 变更日志