Skip to content
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

fix(module: input): OnChange will invoke twice when paste data to Input #2592

Merged
merged 2 commits into from
Aug 13, 2022
Merged

fix(module: input): OnChange will invoke twice when paste data to Input #2592

merged 2 commits into from
Aug 13, 2022

Conversation

WhyILoveSpringRoll
Copy link
Contributor

@WhyILoveSpringRoll WhyILoveSpringRoll commented Aug 2, 2022

🤔 This is a ...

  • New feature
  • 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. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link

github-actions bot commented Aug 2, 2022

@WhyILoveSpringRoll WhyILoveSpringRoll changed the title 修复粘贴数据至input组件时,OnChange会触发两次的问题 修复将数据粘贴到Input时OnChange将调用两次的错误 Aug 2, 2022
@codecov
Copy link

codecov bot commented Aug 2, 2022

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%) ⬆️
components/core/Helpers/MemberPath/PathNode.cs 46.15% <0.00%> (-8.85%) ⬇️
components/core/Reflection/TypeDefined.cs 77.77% <0.00%> (-7.94%) ⬇️
components/input/InputGroup.razor.cs 87.50% <0.00%> (-6.95%) ⬇️
...ponents/date-picker/types/DatePickerPlaceholder.cs 22.72% <0.00%> (-4.20%) ⬇️
...ponents/core/Component/Overlay/type/TriggerType.cs 81.25% <0.00%> (-2.97%) ⬇️
components/core/Helpers/DateHelper.cs 80.00% <0.00%> (-2.71%) ⬇️
...nts/core/Component/Overlay/OverlayTrigger.razor.cs 52.91% <0.00%> (-2.69%) ⬇️
components/core/Component/Overlay/Overlay.razor.cs 66.86% <0.00%> (-2.52%) ⬇️
...onents/date-picker/internal/DatePickerHeader.razor 43.90% <0.00%> (-2.48%) ⬇️
... 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.

@anranruye
Copy link
Member

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

@WhyILoveSpringRoll
Copy link
Contributor Author

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

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

@ElderJames ElderJames changed the title 修复将数据粘贴到Input时OnChange将调用两次的错误 fix(module: input): OnChange will invoke twice when paste data to Input Aug 11, 2022
Copy link
Member

@ElderJames ElderJames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ElderJames ElderJames merged commit 02b0dd2 into ant-design-blazor:master Aug 13, 2022
ElderJames pushed a commit that referenced this pull request Sep 6, 2022
…ut (#2592)

* 修复粘贴数据至input组件时,OnChange会触发两次的问题

* 修复Search组件无法触发Blur的问题
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.

None yet

3 participants