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: segmented): binding value type causes an incorrect initialization selection #2869

Conversation

ElderJames
Copy link
Member

🤔 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

fixed #2868

💡 Background and solution

While TValue is value type, DefaultValue !=null is always true, but the DefaultValue default is not the binding value, so it would cause incorrect binding at initial time.

📝 Changelog

Language Changelog
🇺🇸 English Fixed binding value type causes an incorrect initialization selection
🇨🇳 Chinese 修复绑定值类型导致初始化选中错误

☑️ 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 Nov 9, 2022

@codecov
Copy link

codecov bot commented Nov 9, 2022

Codecov Report

Base: 44.20% // Head: 44.60% // Increases project coverage by +0.40% 🎉

Coverage data is based on head (bd34adc) compared to base (97fcd5b).
Patch coverage: 63.63% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2869      +/-   ##
==========================================
+ Coverage   44.20%   44.60%   +0.40%     
==========================================
  Files         545      545              
  Lines       25775    25779       +4     
  Branches      261      261              
==========================================
+ Hits        11394    11500     +106     
+ Misses      14341    14239     -102     
  Partials       40       40              
Impacted Files Coverage Δ
components/segmented/Segmented.razor.cs 66.66% <60.00%> (+66.66%) ⬆️
components/segmented/SegmentedItem.razor.cs 80.76% <100.00%> (+80.76%) ⬆️
components/core/JsInterop/JSInteropConstants.cs 34.40% <0.00%> (+1.60%) ⬆️
components/segmented/SegmentedItem.razor 57.14% <0.00%> (+57.14%) ⬆️
components/segmented/Segmented.razor 87.50% <0.00%> (+87.50%) ⬆️

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

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ElderJames ElderJames merged commit 6760a41 into ant-design-blazor:master Nov 9, 2022
@ElderJames ElderJames deleted the fix/segmented/bool-default-value branch November 9, 2022 09:40
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.

Segmented component binding error
1 participant