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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Cannot get Text from autocomplete on iOS

Thread ID:

Created:

Updated:

Platform:

Replies:

131401 Jul 7,2017 12:09 PM UTC Jul 31,2017 10:52 AM UTC Xamarin.Forms 3
loading
Tags: SfAutoComplete
David Perera
Asked On July 7, 2017 12:09 PM UTC

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;
        }
        
    }

Vanaja  Annasamy [Syncfusion]
Replied On 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.

Rohan Satpute
Replied On 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

Vanaja  Annasamy [Syncfusion]
Replied On 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.

CONFIRMATION

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.

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

;