Combobox is not always display list

I am using a number of comboboxes in my  blazor server project it is always showing data. Sometimes they are empty, other times they display data. 

My app fetches data via a service is then used as datasource to the comboboxes. I have included relevant code blocks from my app below



//code snippet for  comboboxes

<div class="col-6 form-group">
                                <SfComboBox TValue="string"
                                            TItem="TaxCodeLookup"
                                            @bind-Value="@TaxCodeId"
                                            DataSource="@GetTaxCodes"
                                            AllowFiltering="true"
                                            PopupHeight="100"
                                            Placeholder="Select Tax Code"
                                            FloatLabelType="FloatLabelType.Always">
                                    <ComboBoxFieldSettings Text="CodeRate" Value="Id">

                                    </ComboBoxFieldSettings>
                                </SfComboBox>
                            </div>


   <div class="col-6 form-group">
                                <SfComboBox TValue="string"
                                            DataSource="@GetCategoryLookups()"
                                            TItem="CategoryLookup"
                                            @bind-Value="@CategoryId"
                                            AllowFiltering="true"
                                            Placeholder="Select Category"
                                            FloatLabelType="FloatLabelType.Always">

                                    <ComboBoxFieldSettings Text="Name" Value="Id">

                                    </ComboBoxFieldSettings>
                                </SfComboBox>

                            </div>

 <div class=" col-6 form-group">
                                <SfComboBox TItem="SupplierLookup"
                                            TValue="string"
                                            DataSource="@GetSuppliers"
                                            Placeholder="Sales Nominal Code"
                                            FloatLabelType="FloatLabelType.Always">
                                    <ComboBoxFieldSettings Text="" Value="">

                                    </ComboBoxFieldSettings>
                                </SfComboBox>
                            </div>

                            <div class="col-6 form-group">
                                <SfComboBox TValue="string"
                                            TItem="DepartmentLookup"
                                            @bind-Value="@DepartmentId"
                                            DataSource="@GetDepartments"
                                            AllowFiltering="true"
                                            Placeholder="Department"
                                            FloatLabelType="FloatLabelType.Always">
                                    <ComboBoxFieldSettings Text="Name" Value="Id">

                                    </ComboBoxFieldSettings>
                                </SfComboBox>
                            </div>



//Componentbase code


        [Inject]
        public IProductService ProductService { get; set; }
        [Inject]
        public ICategoryService CategoryService { get; set; }
        [Inject]
        public ITaxCodeService TaxCodeService { get; set; }
        [Inject]
        public ISupplierService SupplierService { get; set; }
        [Inject]
        public IDepartmentService DepartmentService {  get; set; }

        public List<CategoryLookup> GetCategories { get; set; } = new List<CategoryLookup>();
        public List<TaxCodeLookup> GetTaxCodes { get; set; } = new List<TaxCodeLookup>();
        public List<DepartmentLookup> GetDepartments { get; set; } = new List<DepartmentLookup>(); 
        public List<SupplierLookup> GetSuppliers { get; set; } = new List<SupplierLookup>(); 
        protected ProductForRegisterDto product { get; set; } = new ProductForRegisterDto();

        [Inject]
        public NavigationManager navigationManager { get; set; }

        //[Parameter]
        //public string Id { get; set; } = "";

        protected string SupplierId { get; set; } = "";
        protected string TaxCodeId { get; set; } = "";
        protected string CategoryId { get; set; } = "";
        protected string DepartmentId { get; set; } = "";

        public string GetProductCode { get; set; } = "";

        protected override void OnInitialized()
        {
            base.OnInitialized();
            { }
        }

        protected async override Task OnInitializedAsync()
        {
            GetTaxCodes = (await TaxCodeService.GetTaxCodeLookups()).ToList();
            GetCategories = (await CategoryService.GetCategoryLookup()).ToList();
            GetSuppliers = (await SupplierService.GetSupplierLookup()).ToList();
            GetDepartments = (await DepartmentService.GetDepartmentLookup()).ToList();


        }

3 Replies 1 reply marked as answer

BC Berly Christopher Syncfusion Team March 29, 2021 06:48 AM UTC

Hi Paul, 
  
Greetings from Syncfusion support. 
  
Based on the provided code details, we have checked the ComboBox component with own service which is assigned in the OnInitializedAsync method. However, the data is still shown in the ComboBox. So, please check the attached sample and share any issue reproducing case or sample that will help us to check and proceed further at our end, as you mentioned that the identified issue occurs occasionally. 
  
  
Regards, 
Berly B.C 


Marked as answer

PA Paul March 30, 2021 09:48 PM UTC

Hello Berly,

Thanks for your reply.

The combos are now showing data constituently after I updates Syncfusion Blazor Template Studio.


Thanks for usual assistance






BC Berly Christopher Syncfusion Team March 31, 2021 05:16 AM UTC

Hi Paul, 
  
We are glad to know that your issue is resolved. Please let us know if you need further assistance on this. 
  
 
Regards, 
Berly B.C 


Loader.
Up arrow icon