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

Cannot get Text from autocomplete on iOS

Hello,

I am using the 15.2.0.46 version of the AutoComplete component.

What I want is to retrieve the text that the user has entered (even if is different from the suggestion). On Android it works perfectly, but on iOS it does not work. On the example I attach, on iOS it does only have autocomplete.Text!="" when you manually select one of the items(but no when you type text), on Android it works perfectly. More information if it helps: It does not trigger the AutoComplete_selectionChanged event when the user enters text, and on Android it does  

Here is the example code:

public partial class MainPage : ContentPage
    {

        SfAutoComplete autocomplete;
            Entry entry;

        public MainPage()
        {
            InitializeComponent();



            autocomplete = new SfAutoComplete
            { MaximumDropDownHeight = 200,
                //MinimumPrefixCharacters = 1,
                ShowSuggestionsOnFocus = true,
                HeightRequest = 50,
                WidthRequest = 200,
                AutoCompleteMode = AutoCompleteMode.Suggest,
                Watermark = "Enter a country name"
            };

            List<String> countryName = new List<String>();
            countryName.Add("Uganda");
            countryName.Add("Ukraine");
            countryName.Add("United Arab Emirates");
            countryName.Add("United Kingdom");
            countryName.Add("United States");
            autocomplete.AutoCompleteSource = countryName;
            autocomplete.SelectionChanged += Autocomplete_SelectionChanged;


            entry = new Entry
             {
                 Text = "enter",
                 FontSize = 20
             };


            Content = new StackLayout
            {
                Children = { autocomplete, entry }
            };
  
            
        }

        private void Autocomplete_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
          entry.Text=autocomplete.Text;
        }
        
    }

3 Replies

VA Vanaja  Annasamy Syncfusion Team July 10, 2017 11:48 AM UTC

Hi David,

We were able to reproduce the reported issue. A support incident to track the status of this defect has been created under your account.

Please log on to our support website to check for further updates.

Link: https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents/   

Regards,
Vanaja R.A.


RS Rohan Satpute replied to David Perera July 29, 2017 11:28 AM UTC

Hi Vanaja, David said he was able to get the text (if not in suggestion) on Android. I am getting empty string in Text even on Android. Please let me know how I can get the entered text in case it doesn't match any suggestion...Thanks, Rohan


VA Vanaja  Annasamy Syncfusion Team July 31, 2017 10:52 AM UTC

Hi Rohan,

We have fixed the reported issue "Cannot get text from SfAutoComplete which is not in suggestion list" in Android. The fix will be included in Volume 3 Main release which is expected to be rolled out by the beginning of August 2017.

Regards,
Vanaja R.A.

Loader.
Up arrow icon