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