RadzenDropDown EnterKey ArgumentOutOfRangeException

Hi,

I'm using the RadzenDropDown with AllowFiltering="true" + LoadData.
When I click on an item, everything works as expected.
When I use the enter key, I get a System.ArgumentOutOfRangeException

I'm using Radzen 4.28.6

Here is my code :

<RadzenDropDown AllowClear="true" @bind-Value="@_personneId"
                    LoadData="@OnLoadPersonnesDataAsync" AllowFiltering="true" FilterDelay="200"
                    Data="@_personnes" TextProperty="Nom" ValueProperty="Id" Multiple="false"
                    Change="@OnPersonneChangeAsync" Placeholder="Recherche globale" Style="width: 100%; display: block; height: inherit;">
    <Template Context="item">
        <!-- template here -->
    </Template>
</RadzenDropDown>
private async Task OnLoadPersonnesDataAsync(LoadDataArgs args)
{
    _personnes = new List<PersonneModel>();
    
    if (!_isLoadingExternalData && !string.IsNullOrEmpty(args.Filter))
    {
        var pagination = new OptionsDePagination { NbParPage = 20 };
        var tris = new OptionsDeTri();
        var filtres = new OptionsDeFiltrage();

        _isLoadingExternalData = true;
        var physiquesTmp = await PersonneService.GetPersonnesPhysiquesAsync(UserId, RoleId, filtres, pagination, tris, args.Filter);
        var moralesTmp = await PersonneService.GetPersonnesMoralesAsync(UserId, RoleId, filtres, pagination, tris, args.Filter);
        _isLoadingExternalData = false;
        
        var physiques = Mapper.Map<IEnumerable<PersonneModel>>(physiquesTmp.personnes);
        var morales = Mapper.Map<IEnumerable<PersonneModel>>(moralesTmp.personnes);
        
        foreach (var p in physiques)
        {
            var email = string.IsNullOrEmpty(p.Email)
                ? "Email non renseigné"
                : p.Email;
            _personnes.Add(new PersonneModel
            {
                Id = p.Id,
                Nom = $"{p.Prenom} {p.Nom} | {email}",
                EstPersonneMorale = false
            });
        }
        
        foreach (var m in morales)
        {
            var siret = string.IsNullOrEmpty(m.SIRET)
                ? "SIRET non renseigné"
                : $"{long.Parse(m.SIRET):### ### ### #####}";
            _personnes.Add(new PersonneModel
            {
                Id = m.Id,
                Nom = $"{m.FormeJuridiqueNom} {m.RaisonSociale} | {siret}",
                EstPersonneMorale = true
            });
        }
        
        InvokeAsync(StateHasChanged);
    }
}
  
private async Task OnPersonneChangeAsync(dynamic item)
{
    if (item == null || item == 0)
        return;
    
    var p = _personnes.Single(x => x.Id == item);
    _personnes = new List<PersonneModel>();
    _navManager.NavigateTo(p.EstPersonneMorale ? $"Personnes/Morale?id={p.Id}" : $"Personnes/Physique?id={p.Id}", true);
}

Any idea ?

Thanks !

Thanks @kevinyn! Will be fixed in our next update later the week.

Great ! Thank you guys!

Hi !

As you said, this was fixed in the last release :partying_face:

Do you have any idea why the Change event is not triggered when I press enter ?
It is when I click on an item

Thx,
Kevin

Works normally for me:
dd-change

You can attach Radzen.Blazor.csproj to your project to debug your case.

Hi @enchev

I just noticed something.

When I try to select with the Enter key, nothing happens.
If, just after having pressed the Enter key, I press the ArrowLeft or ArrowRight, then the OnChange event is being triggered.

The same behaviour is observable on Firefox & Edge (last version)

Another point : I noticed an issue with keyboard navigation and scrolling of the page (for Firefox only). If I focus on a RadzenDropDown and press ArrowUp/Down, the whole page scrolls

Not sure where you observe this, on our demos? Which one?

Here is what I see:
dd-ff