feat: add dynamically recognized type to FluentSelect bind-Value #2031
Labels
closed:duplicate
Duplicate of another issue
status:needs-investigation
Needs additional investigation
馃檵 Feature Request
Add dynamically recognized type to FluentSelect bind-Value, such as the Blazor's InputSelect "@bind-Value" does
We are in the process of converting some of our application to Fluent UI.
We want to convert from InputSelect to FluentSelect, however, FluentSelect seems not to follow the basic standard Blazor controls design, in which bind-Value usually recognizes the type based on the bound property.
FluentSelect seems to always want a string, which means you require to do calls to .ToString() and Convert.ToXXXXX() when the source data is not a string, just as in the samples
This is a sample page we want to update.
https://github.com/pticostaricags/FairPlayCombined/blob/development/src/FairPlayCombinedSln/FairPlayDating/Components/Pages/MyUserProfile.razor
馃 Expected Behavior
Make FluentSelect work similar to Blazor's InputSelect, by having @bind-Value support types other than strings, and recognizable based on the bound property.
馃槸 Current Behavior
You are forced to do lots of calls to ToString(), Convert.ToXXXX, or even create additional SelectItemProperties wrapping the code to set and get a property in another model.
馃拋 Possible Solution
Making it work as Blazor's InputSelect should be enough.
馃敠 Context
馃捇 Examples
The text was updated successfully, but these errors were encountered: