Skip to content

@bind-Selected Option:after doesn't work in my component #3127

Answered by vnbaaij
DomenicoFormoso asked this question in Q&A
Discussion options

You must be logged in to vote

Your code does not work because it is using manual FluentOptions (that dont' have a Value set!!). We can only partially create the needed relation between the component and the options if you specify them manually.

Replace the code with below, and you will see the @bind-SelectedOption:after gets called with the selected value:
(this is based on the code from https://www.fluentui-blazor.net/Combobox#from-list-of-option%3Cstring%3E-items)

<FluentInputLabel Orientation="Orientation.Horizontal">@Etichetta</FluentInputLabel>
    <FluentCombobox Items=@stringOptions
                OptionText="@(i => i.Text)"
                OptionValue="@(i => i.Value)"
                OptionSelected="@(i => i…

Replies: 4 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@shark0151
Comment options

@vnbaaij
Comment options

@shark0151
Comment options

Answer selected by DomenicoFormoso
Comment options

You must be logged in to vote
3 replies
@DomenicoFormoso
Comment options

@vnbaaij
Comment options

@DomenicoFormoso
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants