Hello Team,
I have a search box when entered data will trigger an API call to get some list. I am using SFMultiselect because we need multiple selections. I tied my sfmultiselect to the custom data adaptor. The problem is my ReadAsync function is not getting the characters that i am typing in the multiselect box. I am posting my code below.
<SfMultiSelect @ref="CompanyAutoComplete_Add" TValue="string" TItem="QuoteOutput">
<SfDataManager AdaptorInstance="@typeof(CustomAdaptor)" Adaptor="Adaptors.CustomAdaptor"></SfDataManager>
<MultiSelectFieldSettings Value="Description" Text="Description"></MultiSelectFieldSettings>
</SfMultiSelect>
public class CustomAdaptor : DataAdaptor
{
public override async Task<object> ReadAsync(DataManagerRequest dm, string key = null)
{
var DataSource = new List<QuoteOutput>();
var searchString = dm.Where.FirstOrDefault()?.value;
if (searchString != null)
{
DataSource = await _http.GetFromJsonAsync<List<QuoteOutput>>($"api/trades/searchCompanies/{searchString}");
}
dm = null;
return (object)DataSource;
}
}
The "DataManagerRequest" above is null when i type into the multi select box.