Closed wnvko closed 2 months ago
I am trying to bind a select component to a variable.
Use code like this:
<IgbSelect Label="Label/Placeholder" @bind-Value="_select"> @foreach (var item in _northwindCategories) { <IgbSelectItem Value="@item.CategoryID.ToString()">@item.Name</IgbSelectItem> } </IgbSelect> <IgbSelect Label="Label/Placeholder" Value="_select" Change="SelectChange"> @foreach (var item in _northwindCategories) { <IgbSelectItem Value="@item.CategoryID.ToString()">@item.Name</IgbSelectItem> } </IgbSelect> <p>Select is @_select</p> ... @code { private string _select; protected void SelectChange(IgbSelectItemComponentEventArgs e) { _select = e.Detail.Value; }
@bind does not work at all and does not update the bound variable. In Change event Detail is always null and I am not able to update the variable.
@bind
Change
Detail
null
@bind should update the variable as well as Details should be correctly initialized.
Details
This has been resolved internally. We'll close the issue once a release is out with the fix.
@wnvko The fix should be out with 23.2.257
Description
I am trying to bind a select component to a variable.
Steps to reproduce
Use code like this:
Result
@bind
does not work at all and does not update the bound variable. InChange
eventDetail
is alwaysnull
and I am not able to update the variable.Expected result
@bind
should update the variable as well asDetails
should be correctly initialized.