Autocomplete showing 0 (zeros)

Good evening,

I have that markup

<div class="col-sm-12 col-md-12 col-md-6 col-lg-5">

    <SfTooltip Content="digite 3 caracteres para começar a pesquisar os planos de conta">

        <SfAutoComplete PopupWidth="150%"

                        FloatLabelType="@FloatLabelType.Auto"

                        TValue="long"

                        @ref="DescricaoPlanoDeContaAutocomplete"

                        TItem="PlanoDeContaModel"

                        Placeholder="Plano de Conta"

                        AllowFiltering="true"

                        DataSource="ViewModel.PlanosDeContaAutocomplete"

                        @bind-Value="ViewModel.PlanoDeConta.Id">

            <AutoCompleteFieldSettings Text="Descricao" Value="Id"></AutoCompleteFieldSettings>

            <AutoCompleteTemplates TItem="PlanoDeContaModel">

                <ItemTemplate Context="ItemContext">

                    <div class="autocomplete-container">

                        <div class="autocomplete-container-descricao">@ItemContext.Descricao </div>

                        <div class="autocomplete-container-classes">@($"Classificação: {ItemContext.DescricaoClassificacao}") </div>

                        <div class="autocomplete-container-debcred">@($"Débito/Crédido: {ItemContext.DescricaoDebitoCredito} - Tipo: {ItemContext.DescricaoTipo}") </div>

                        <hr width="100%">

                    </div>

                </ItemTemplate>

            </AutoCompleteTemplates>

            <AutoCompleteEvents TValue="long" TItem="PlanoDeContaModel" Filtering="ViewModel.AoFiltrarPlanoDeContaAutocomplete"></AutoCompleteEvents>

        </SfAutoComplete>

    </SfTooltip>

</div>


if I write  ViewModel.PlanoDeConta = new PlanoDeContaModel() the autocomplete shows 0 instead of to clear the autocomplete.

What am I missing?


1 Reply

KP Kokila Poovendran Syncfusion Team August 14, 2023 04:47 PM UTC

Hi Társis,


Greeting from Syncfusion support!


We have validated the reported query on our end. Unfortunately, we weren’t able to reproduce the reported issue as per your scenario.


Also, we request that you provide additional details about the issue, as mentioned below. This will help us validate the issue further and provide you with a better solution.


  • Issue a reproducible sample (or modify the shared sample as per your scenario).
  • Video illustration if applicable.
  • Your Syncfusion package version.

Attachment: BlazorServerProject_8fc0ea46.zip

Loader.
Up arrow icon