Autocomplete error when search doest found a record and then return to the page

Hi guys, I am experiencing a weird error, I have an SfAutoComplete

<SfAutoComplete @ref="AutoCompleteCliente" TItem="ClienteDto" TValue="string" AllowFiltering="true" @bind-Value="@VM.ClienteId" DataSource="@VM.Clientes" Placeholder="Selecione el Cliente">

<AutoCompleteFieldSettings Value="ClienteId" Text="Nombre"></AutoCompleteFieldSettings>

<AutoCompleteEvents TItem="ClienteDto" TValue="string" Filtering="@OnFilteringClientes"></AutoCompleteEvents>

</SfAutoComplete>

This is my OnFilteringClientes event

private SfAutoComplete AutoCompleteCliente;

public Query query;

private async Task OnFilteringClientes(FilteringEventArgs args)

{

args.PreventDefaultAction = true;

await VM.SearchClientes(args.Text);

query = new Query().Where(new WhereFilter()

{

Field = "Nombre",

value = args.Text,

Operator = "contains",

IgnoreCase = true

});

await this.AutoCompleteCliente.Filter(VM.Clientes, query);

}


The DataSource List and the ClientId variable are on a ViewModel

public string ClienteId { get; set; }

public List Clientes { get; set; } = new List();


Everything works great, but something weird happen when I write a Client name that is not on the list and then I go to another page and then return I got this error:

crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]

Unhandled exception rendering component: Arg_ObjObjEx

System.ArgumentException: Arg_ObjObjEx

at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr)


I'm not sure what I am doing wrong, thanks for your help


4 Replies

DR Deepak Ramakrishnan Syncfusion Team October 5, 2021 03:13 PM UTC

Hi Luis, 
 
Greetings from Syncfusion support. 
 
We are currently working on your requirement with provided details  We will update the possibilities in two business days(7th,October 2021) . 
 
Thanks, 
Deepak R. 
 



BC Berly Christopher Syncfusion Team October 12, 2021 06:16 PM UTC

Hi Luis, 

Thanks for the patience. 

We have checked the AutoComplete component with shared code details. Unfortunately, the reported issue does not occurred at our end. So, we have prepared the sample and attached it below. 


Please check the above attached sample and share the below requested details that will help us to check and proceed further from our end. 

  1. Replication procedure
  2. Modify the attached sample with reported issue
  3. Data source details.
  4. Syncfusion NuGet version

Regards, 
Berly B.C 



LR Luis Roberto October 13, 2021 07:31 PM UTC

Thank you very much guys, I am gonna checkout the sample to see what I'm doing wrong.


Take care



RP Ranjani Prabakaran Syncfusion Team October 14, 2021 04:38 AM UTC

Hi Luis, 

Please check out the provided sample and let us know how it turns out for you.  

Regards, 

Ranjani 


Loader.
Up arrow icon