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!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

After clearing the value and focusing on the component, autocomplete does not show all of the data.


Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/AutoComplete_sample1081140069

Replication procedure: 

  1. Run the attached sample 

  2. Focus the component. Now, we can see the ListView Data. 

  3. Now, type the value as “aust”. We can get the suggestion regarding typed value. 

  4. Now, choose the “Australia” from the suggestion. Then focus out the component. 

  5. Then clear the value and focus out the component.

  6. The popup should display complete data but we can see the previously searched item alone.

 

Empty


<div class="page-inner" id="pageinner">

    <p>Datasource Values</p>


    <div class="row">

        <div class="col-12 mt-3 pt-3">

            <div class="inner-body mg-main">


                <SfAutoComplete @ref="@AutoCompleteObj" TValue="string" TItem="AssetTagsViewModel" AllowFiltering="true" DataSource="@AssetTagsFilterModel" MinLength="4">

                    <AutoCompleteFieldSettings Value="Tag"></AutoCompleteFieldSettings>

                    <AutoCompleteTemplates TItem="AssetTagsViewModel">

                        <NoRecordsTemplate>                           

                            <SfListView TValue="AssetTagsViewModel1" DataSource="@AssetTagsFilterModel1">

                                <ListViewFieldSettings TValue="AssetTagsViewModel1" Id="ID" Text="Tag"></ListViewFieldSettings>

                            </SfListView>

                        </NoRecordsTemplate>

                    </AutoCompleteTemplates>

                    <AutoCompleteEvents Focus="onFocus" TItem="AssetTagsViewModel" TValue="String" Filtering="@OnFiltering"></AutoCompleteEvents>

                </SfAutoComplete>

            </div>

        </div>

    </div>

</div>




@code {

    public class Countries

    {

        public string Name { get; set; }


        public string Code { get; set; }

    }


    List<Countries> Country = new List<Countries>

{

        new Countries() { Name = "Australia", Code = "AU" },

        new Countries() { Name = "Bermuda", Code = "BM" },

        new Countries() { Name = "Canada", Code = "CA" },

        new Countries() { Name = "Cameroon", Code = "CM" },

        new Countries() { Name = "Denmark", Code = "DK" },

        new Countries() { Name = "France", Code = "FR" },

        new Countries() { Name = "Finland", Code = "FI" },

        new Countries() { Name = "Germany", Code = "DE" },

        new Countries() { Name = "Greenland", Code = "GL" },

        new Countries() { Name = "Hong Kong", Code = "HK" },

        new Countries() { Name = "India", Code = "IN" },

        new Countries() { Name = "Italy", Code = "IT" },

        new Countries() { Name = "Japan", Code = "JP" },

        new Countries() { Name = "Mexico", Code = "MX" },

        new Countries() { Name = "Norway", Code = "NO" },

        new Countries() { Name = "Poland", Code = "PL" },

        new Countries() { Name = "Switzerland", Code = "CH" },

        new Countries() { Name = "United Kingdom", Code = "GB" },

        new Countries() { Name = "United States", Code = "US" },

    };

    public List<AssetTagsViewModel> AssetTagsFilterModel;

    public List<AssetTagsViewModel1> AssetTagsFilterModel1;

    SfAutoComplete<string, AssetTagsViewModel> AutoCompleteObj;


    private async Task OnFiltering(FilteringEventArgs args)

    {


        AssetTagsFilterModel = await ownservice.GetDataAsync(args.Text);


    }

    protected override async Task OnAfterRenderAsync(bool firstRender)

    {


        AssetTagsFilterModel1 = await weatherservice.GetDataAsync1();

    }

    public void OnClose(ClosedEventArgs args)

    {


    }

    public void onFocus(object args)

    {

        this.AutoCompleteObj.ShowPopup();

    }

}