SelectOption bug when Value = 0
See original GitHub issueHi team! I get a bug when using a select input and value of SelectOption = 0
<Select @bind-Value="@_selectedValue2"
Style="width: 120px;"
TItemValue="int"
TItem="string">
<SelectOptions>
<SelectOption TItemValue="int" TItem="string" Value=@(0) Label="zero" />
<SelectOption TItemValue="int" TItem="string" Value=@(1) Label="one" />
<SelectOption TItemValue="int" TItem="string" Value=@(2) Label="two" />
</SelectOptions>
</Select>
@code {
private int _selectedValue2 = 0;
}
Further technical details
- AntDesign Nuget Package version 0.8.1
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
why select option value if zero post empty
I am if select value="0" option and this post, it retuns the value with no problem. But, when I use value = 0...
Read more >Ion-select doesn't show item with 0 value · Issue #16170
Bug Report Describe the Bug When a value is bound to a ion-select-option through the square brackets the option with value 0 is...
Read more >Validation Error: Value is not valid - One Cause/Solution
Usually when we see this error it's because someone has written their selectOptions getter in a way that will not produce consistent results, ......
Read more >AngularJS: API: select
When an item in the <select> menu is selected, the value of the selected option will be bound to the model identified by...
Read more >How to Handle Dropdown in Playwright
With a playwright, you can handle different types of dropdowns. This article will focus on the basic one, including select and option tags....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@datnguyen89 Until now, another workaround is to do what @anranruye suggested but do not bind to a property in your model. Just attach
OnSelectedItemChanged
action and set your model’s property there.@datnguyen89 once we have decided what is the most expected behavior, we will fix this soon.