SfAutoComplete SelectionChanged not working if using SelectedItem

I have issues with the SelectedChanged when using SelectedItem for SfAutocomplate.
I've added the selected items for editing to auto-complete.
The SelectionChanged event does not working.

ContentPage:
        ViewModel vm = new ViewModel();

        public MainPage()
        {
            InitializeComponent();
            this.BindingContext = vm;

            autoComplete.SelectionChanged += AutoComplete_SelectionChanged; ;
        }

        private void AutoComplete_SelectionChanged(object sender, Syncfusion.SfAutoComplete.XForms.SelectionChangedEventArgs e)
        {
            //
        }

XAML:
     <autocomplete:SfAutoComplete
                    HeightRequest="100"
                    ShowSuggestionsOnFocus="True"
                    x:Name="autoComplete"
                    IsSelectedItemsVisibleInDropDown="False"
                    MultiSelectMode="Token"
                    DataSource="{Binding AutoCompleteSource}"
                    SelectedItem="{Binding AutoCompleteSelectedItem}"/>

ViewModel:
     public ViewModel()
        {
            LoadData();
        }
   
        private ObservableCollection<object> autocompleteselecteditem = new ObservableCollection<object>();
        public ObservableCollection<object> AutoCompleteSelectedItem
        {
            get
            {
                return autocompleteselecteditem;
            }
            set
            {
                autocompleteselecteditem = value;
                NotifyPropertyChanged("AutoCompleteSelectedItem");
            }
        }

        private ObservableCollection<object> autocompletesource = new ObservableCollection<object>();
        public ObservableCollection<object> AutoCompleteSource
        {
            get
            {
                return autocompletesource;
            }
            set
            {
                autocompletesource = value;
                NotifyPropertyChanged("AutoCompleteSource");
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        private void LoadData()
        {
            //DataSource
            AutoCompleteSource.Add("Akrotiri");
            AutoCompleteSource.Add("Albania");
            AutoCompleteSource.Add("Algeria");
            AutoCompleteSource.Add("American Samoa");
            AutoCompleteSource.Add("Anguilla");
            AutoCompleteSource.Add("Antarctica");

            //SelectedItem
            AutoCompleteSelectedItem.Add("Akrotiri");
            AutoCompleteSelectedItem.Add("Albania");
            AutoCompleteSelectedItem.Add("Algeria");
        }

5 Replies

RB Rabhia Beham Kathar Mideenar Syncfusion Team April 6, 2018 10:24 AM UTC

Hi Emrah,

Thanks for contacting Syncfusion support.

We have checked the reported issue in SfAutoComplete control. We could reproduce the reported issue with latest syncfusion assemblies in iOS platform. Please confirm that the issue experienced by you is in the iOS Platform and if not please mention the platform with which you could reproduce the issue.

Please let us know if you have any concern.

Regards,
Rabhia Beham K.



BH bharath June 23, 2018 05:11 AM UTC

Hi Rabhia,

can you please confirm whether fix is released for the above reported issue, as me too facing same issue.


RB Rabhia Beham Kathar Mideenar Syncfusion Team June 25, 2018 11:52 AM UTC

Hi Bharath,

Thanks for contacting Syncfusion support.

We have checked the reported issue in SfAutoComplete control. As informed earlier, we could reproduce the reported issue with latest syncfusion assemblies in iOS platform. We are currently working on the reported issue and the issue fix will be available in Volume 2 Sp 1 release which is expected to be rolled out by the end of July 2018.

Please let us know if you have any concern.

Regards,
Rabhia Beham K.



BH bharath August 3, 2018 07:42 AM UTC

Hi Rabhia,

can you please confirm whether fix is released.

Bharath



PA Paul Anderson S Syncfusion Team August 3, 2018 08:40 AM UTC

Hi Bharath, 
  
Yes, We are glad to let you know that the fix has been included in our latest version 16.2.0.46 and has been released last week. The latest version  
is available for download under the following link. 
 
  
Regards, 
Paul Anderson 


Loader.
Up arrow icon