vant icon indicating copy to clipboard operation
vant copied to clipboard

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

Open keeplearning66 opened this issue 6 months ago • 3 comments

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.

After modification

https://github.com/user-attachments/assets/21ce77f8-12eb-4593-a866-a1b8082a94eb

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

keeplearning66 avatar Jul 14 '25 12:07 keeplearning66

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 89.80%. Comparing base (ec5b45b) to head (062ede3). :warning: Report is 133 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13559      +/-   ##
==========================================
+ Coverage   89.60%   89.80%   +0.20%     
==========================================
  Files         257      257              
  Lines        7013     7045      +32     
  Branches     1736     1743       +7     
==========================================
+ Hits         6284     6327      +43     
+ Misses        384      379       -5     
+ Partials      345      339       -6     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov-commenter avatar Jul 14 '25 12:07 codecov-commenter

When will this problem be fixed?

code-farmer-i avatar Oct 13 '25 02:10 code-farmer-i

I'm not sure either — this PR still hasn't been reviewed. 😢

keeplearning66 avatar Oct 16 '25 00:10 keeplearning66