I upgraded a blazor wasm project from v19.1.69 to v19.2.44, and I found an issue with the odata and the autocomplete control, the url does not contain fields on the select when calling the endpoint
If I rollback to v19.1.69 everything works fine.
@using Syncfusion.Blazor.DropDowns;
@using Syncfusion.Blazor.Data;
<SfAutoComplete TValue="string" TItem="Order" Placeholder="Select a name" Query="@fieldQuery" Autofill="true">
<SfDataManager @ref="DM" Url=https://services.odata.org/V4/Northwind/Northwind.svc/Orders/ Adaptor="Adaptors.ODataV4Adaptor"></SfDataManager>
<AutoCompleteFieldSettings Value="ShipName"></AutoCompleteFieldSettings>
</SfAutoComplete>
@code{
public SfDataManager DM { get; set; }
public Query fieldQuery = new Query().Select(new List<string> { "ShipName" }).Take(10).RequiresCount();
public class CustomODataV4 : ODataV4Adaptor
{
public CustomODataV4(DataManager dataManager) : base(dataManager)
{
}
public override string OnSelect(List<string> selects)
{
selects = selects.Where(select => !select.Contains('.', StringComparison.Ordinal)).ToList();
return string.Join(",", selects);
}
}
protected override void OnAfterRender(bool firstRender)
{
base.OnAfterRender(firstRender);
if (DM != null)
{
#pragma warning disable BL0005
DM.DataAdaptor = new CustomODataV4(DM);
#pragma warning restore BL0005
}
}
public class Order
{
public int? OrderID { get; set; }
public string CustomerID { get; set; }
public DateTime? OrderDate { get; set; }
public double? Freight { get; set; }
public string ShipName { get; set; }
}
} |
Hi Ponmani, thank you for your answer, I'll continue working with v19.1.69 until next release.
Thanks,
Ponmani thank you, i already did the update and it works.
Regards,