We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

FilterCollectionChangedEventArgs e always has null value on iOS.

Thread ID:





146452 Aug 4,2019 09:23 PM UTC Aug 6,2019 11:02 AM UTC Xamarin.Forms 1
Tags: SfAutoComplete
Asked On August 4, 2019 09:23 PM UTC

Hello, I have a problem with SfAutocomplete. Here is my xaml:

                DataSource="{Binding FoodItems}"
                FilteredItems="{Binding FilteredItems, Mode=TwoWay}"
                SuggestionMode="Contains" />

And here is my code:

        private void AutoCompleteSearchBar_FilterCollectionChanged(object sender, FilterCollectionChangedEventArgs e)
            dispatcher.Debounce(500, () =>
                 Device.BeginInvokeOnMainThread(() =>
                     myLlistView.ItemsSource = (IEnumerable<object>)e.Value;
                     Debug.WriteLine("Executed from Device.BeginInvokeOnMainThread on filter complete");

On iOS the e.Value object is always null but it works fine on UWP. I can't test it on Android at the moment. To get around the issue I've replaced e.Value with autoCompleteSearchBar.FilteredItems. 

On a side note, does SfAutoComplete not have an option to only change the FilteredItems list after the user has finished inputting text ?  SfAutoComplete itself is very fast but I have another control that depends on the FilteredItems property and having it change every time the user types something makes it have to redraw too much and it lags when there are many items. I had to use the FilterChanged event to use a debouncer that will manually set the list ItemSource after a certain interval.

Muneesh Kumar G [Syncfusion]
Replied On August 6, 2019 11:02 AM UTC

Hi George, 
Greetings from Syncfusion. 
We would like to let you know that the same could be achieved using FilteredItems API. Please have the sample from the below link, 
Code Snippet: 
listView.ItemsSource = (sender as SfAutoComplete).FilteredItems; 
Please check with the sample and let us know if you have any concern. 
Muneesh Kumar G. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon