Skip to content

FluentSelect binding issue #2386

Closed Answered by thellebuyck
thellebuyck asked this question in Q&A
Discussion options

You must be logged in to vote

my apologies.... you should be able to run this snippet below:


<PageTitle>Home</PageTitle>

<FluentSelect TOption="StateCodeDto"
              Autofocus="true"
              Label="Select a State"
              Items="@SelectedItems"
              Id="stateCode"
              Width="250px"
              Height="250px"
              Placeholder="Select State"
              OptionValue="@(s =>s.Id.ToString())"
              OptionText="@(item => item.Name)"
              @bind-Value="selectedState"
              @bind-SelectedOption="SelectedStateCode" />

              <p>Selected State Code: @SelectedStateCode?.Name</p>

@code {
    IEnumerable<StateCodeDto> SelectedItems = Array.Empty<S…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by thellebuyck
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants