ant-design-blazor icon indicating copy to clipboard operation
ant-design-blazor copied to clipboard

修复将数据粘贴到Input时OnChange将调用两次的错误

Open WhyILoveSpringRoll opened this issue 2 years ago • 4 comments

🤔 This is a ...

  • [ ] New feature
  • [x] Bug fix
  • [ ] Site / documentation update
  • [ ] Demo update
  • [ ] Component style update
  • [ ] Bundle size optimization
  • [ ] Performance optimization
  • [ ] Refactoring
  • [ ] Code style optimization
  • [ ] Test Case
  • [ ] Branch merge
  • [ ] Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English fix bug that OnChange will invoke twice when paste data to Input #2591
🇨🇳 Chinese 修复将数据粘贴到Input时OnChange将调用两次的错误 #2591

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • [x] Doc is updated/provided or not needed
  • [x] Demo is updated/provided or not needed
  • [x] Changelog is provided or not needed

WhyILoveSpringRoll avatar Aug 02 '22 07:08 WhyILoveSpringRoll

github-actions[bot] avatar Aug 02 '22 07:08 github-actions[bot]

Codecov Report

Merging #2592 (61347da) into master (a0fbf6b) will increase coverage by 1.81%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #2592      +/-   ##
==========================================
+ Coverage   27.79%   29.61%   +1.81%     
==========================================
  Files         497      520      +23     
  Lines       33447    25676    -7771     
  Branches        0      250     +250     
==========================================
- Hits         9298     7603    -1695     
+ Misses      24149    18033    -6116     
- Partials        0       40      +40     
Impacted Files Coverage Δ
components/input/Input.cs 66.90% <0.00%> (+3.93%) :arrow_up:
components/core/Helpers/MemberPath/PathNode.cs 46.15% <0.00%> (-8.85%) :arrow_down:
components/core/Reflection/TypeDefined.cs 77.77% <0.00%> (-7.94%) :arrow_down:
components/input/InputGroup.razor.cs 87.50% <0.00%> (-6.95%) :arrow_down:
...ponents/date-picker/types/DatePickerPlaceholder.cs 22.72% <0.00%> (-4.20%) :arrow_down:
...ponents/core/Component/Overlay/type/TriggerType.cs 81.25% <0.00%> (-2.97%) :arrow_down:
components/core/Helpers/DateHelper.cs 80.00% <0.00%> (-2.71%) :arrow_down:
...nts/core/Component/Overlay/OverlayTrigger.razor.cs 52.91% <0.00%> (-2.69%) :arrow_down:
components/core/Component/Overlay/Overlay.razor.cs 66.86% <0.00%> (-2.52%) :arrow_down:
...onents/date-picker/internal/DatePickerHeader.razor 43.90% <0.00%> (-2.48%) :arrow_down:
... and 424 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Aug 02 '22 07:08 codecov[bot]

这样就能避免OnChange被调用两次了吗?从代码里看不出其中的关联性。(抱歉我还没有运行这段代码)

anranruye avatar Aug 06 '22 14:08 anranruye

这样就能避免OnChange被调用两次了吗?从代码里看不出其中的关联性。(抱歉我还没有运行这段代码)

是的如果没有 CurrentValueAsString = args?.Value?.ToString();的话,会调用两次OnChange

WhyILoveSpringRoll avatar Aug 08 '22 02:08 WhyILoveSpringRoll