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
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
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
- Replication procedure
- Modify the attached sample with reported issue
- Data source details.
- Syncfusion NuGet version
Thank you very much guys, I am gonna checkout the sample to see what I'm doing wrong.
Take care
Ranjani
- 4 Replies
- 4 Participants
-
LR Luis Roberto
- Oct 4, 2021 07:14 PM UTC
- Oct 14, 2021 04:38 AM UTC