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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add dynamically recognized type to FluentSelect bind-Value #2031

Closed
efonsecab opened this issue May 9, 2024 · 1 comment
Closed

feat: add dynamically recognized type to FluentSelect bind-Value #2031

efonsecab opened this issue May 9, 2024 · 1 comment
Labels
closed:duplicate Duplicate of another issue status:needs-investigation Needs additional investigation

Comments

@efonsecab
Copy link

馃檵 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.
image

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

@microsoft-github-policy-service microsoft-github-policy-service bot added the triage New issue. Needs to be looked at label May 9, 2024
@vnbaaij vnbaaij added status:needs-investigation Needs additional investigation and removed triage New issue. Needs to be looked at labels May 12, 2024
@vnbaaij
Copy link
Collaborator

vnbaaij commented May 12, 2024

We do not use the InputSelect as our base component and we do not follow the standard Blazor components by default.

We have your request on the ToDo list as it has been asked before (so closing this as a duplicate). Not 100% sure we will be able to put this in and definitely no ETA.

@vnbaaij vnbaaij added the closed:duplicate Duplicate of another issue label May 12, 2024
@vnbaaij vnbaaij closed this as completed May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed:duplicate Duplicate of another issue status:needs-investigation Needs additional investigation
Projects
None yet
Development

No branches or pull requests

2 participants