-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release-2.19] fix: formkit select component not emitting event or updating selection on value change #6610
[release-2.19] fix: formkit select component not emitting event or updating selection on value change #6610
Conversation
…n on value change (halo-dev#6602) #### What type of PR is this? /kind bug /area ui /milestone 2.20.x #### What this PR does / why we need it: 重新修改 formkit select 初始化值的监听方式,用于当 value 发生变化时,使选项值可以发生变化。 另外在更新数据时,如果数据发生变化,则发出 `onChange` 事件。 > 需要注意的是,通过 v-modal 传入默认值,再将此值改为 `undefined` 时无法触发 `watch` 及 formkit 的 `input` 事件,原因暂时未知,将此值设置为 `""` 即可正常触发。 #### How to test it? 由于此 PR 改动了初始化的方式,因此需要全量测试所有使用 `Select` 组件的位置。包括多选与单选,本地源与远程源。确保功能符合预期。 #### Which issue(s) this PR fixes: Fixes halo-dev#6594 #### Does this PR introduce a user-facing change? ```release-note 解决 Formkit Select 组件在值变更时不会发出事件及修改选项值的问题。 ```
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: guqing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release-2.19 #6610 +/- ##
===============================================
Coverage ? 58.06%
Complexity ? 3916
===============================================
Files ? 670
Lines ? 22966
Branches ? 1575
===============================================
Hits ? 13335
Misses ? 9015
Partials ? 616 ☔ View full report in Codecov by Sentry. |
This is an automated cherry-pick of #6602
/assign LIlGG