IgniteUI / igniteui-blazor

Ignite UI for Blazor component library packs 35+ native Blazor UI Controls with 60+ high-performance Charts designed for any Blazor WASM or Server-side app scenario.
https://www.infragistics.com/products/ignite-ui-blazor
3 stars 3 forks source link

Cannot bind select to a variable #111

Closed wnvko closed 2 months ago

wnvko commented 5 months ago

Description

I am trying to bind a select component to a variable.

Steps to reproduce

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;
}

Result

@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.

Expected result

@bind should update the variable as well as Details should be correctly initialized.

damyanpetev commented 3 months ago

This has been resolved internally. We'll close the issue once a release is out with the fix.

damyanpetev commented 2 months ago

@wnvko The fix should be out with 23.2.257