Welcome to the Blazor feedback portal. We’re happy you’re here! If you have feedback on how to improve the Blazor, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
Delayed setting of data source causes no records found in Dropdown in WebAssembly .Net 5.0
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Blazor_WASM1842256184
Video demonstration:https://www.syncfusion.com/downloads/support/directtrac/general/ze/Webassembly_dropdown_menu_missing_items_23f661e92008487242
Replication procedure:
1. Run the below code in Web Assembly .Net 5.0
2. Navigate to counter page using addressbar localhost/counter.
3. Actual: Dropdown shows no records found.
4. Expected: The data should be loaded.
<SfComboBox AllowCustom="false" AllowFiltering="true" DataSource="Data" @bind-Value="Selected">
<ComboBoxFieldSettings Text="Text" Value="Value" />
</SfComboBox>
@code {
public class item
{
public string Text { get; set; }
public string Value { get; set; }
}
public List<item> Data { get; set; } = new List<item>();
public string Selected { get; set; }
protected override async Task OnInitializedAsync()
{
//simulate waiting on API removing delay will resolve issue
await Task.Delay(1000);
Data = new List<item>
{
new item
{
Text = "Test",
Value = "test"
}
};
Selected = Data.First().Value;
}
}