Skip to content

fix(Field): set value of the input field when slot change causes an update #13559

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

keeplearning66
Copy link
Contributor

This PR is to fix #13492

The bug is caused by the slot change leading to an update, but the input field value is not set.

I listen to the update caused by the slot change through onUpdated and call updateValue to set the input field value.

I’m sorry, I’m not sure how to write a unit test for this scenario.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.75%. Comparing base (ec5b45b) to head (be71ba7).
Report is 125 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13559      +/-   ##
==========================================
+ Coverage   89.60%   89.75%   +0.14%     
==========================================
  Files         257      257              
  Lines        7013     7045      +32     
  Branches     1736     1743       +7     
==========================================
+ Hits         6284     6323      +39     
+ Misses        384      381       -3     
+ Partials      345      341       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@keeplearning66 keeplearning66 changed the title fix(Field): set the value of the input field when the slot change causes an update fix(Field): set value of the input field when slot change causes an update Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] 当我尝试动态设置 Field 组件的 input 插槽时,输入框的回显看起来有点问题
2 participants