- Home
- Forum
- Xamarin.Forms
- Hiding keyboard also hide dropdown
Hiding keyboard also hide dropdown
Hello!
When using SFAutocomplete, if the user enters something and presses done on the virtual keyboard (iOS for example), the dropdown with options also disappears.
Is it possible to somehow leave the Dropdown until the user chooses a value.
This is useful in cases where the list is large, the user enters something and then tries to scroll through the Dropdown to select the desired value.
Now dropdown disappears and it is impossible to make a choice.
Thanks.
SIGN IN To post a reply.
3 Replies
1 reply marked as answer
RS
Ruba Shanmugam
Syncfusion Team
March 30, 2021 11:23 AM UTC
Hi Dmitriy,
Greetings from Syncfusion.
We have validated your query and prepared a sample as per your requirement. When you press done button, using Unfocused event if the entered text is not exists in DataSource collection again open the dropdown using IsDropdownOpen property as per below code snippet.
Code snippet:
|
void autoComplete_Unfocused(System.Object sender, Xamarin.Forms.FocusEventArgs e)
{
bool isItemExists = false;
if (enteredText != null)
{
foreach (var item in autoComplete.DataSource)
{
if ((item as Employee).Name == enteredText)
{
isItemExists = true;
break;
}
else
{
isItemExists = false;
}
}
if (!isItemExists)
{
autoComplete.IsDropDownOpen = true;
}
} |
We hope that this helps you, if the sample doesn’t meet your requirement kindly revert us with more details, which help us to analyze and resolve your requirement.
Regards,
Ruba Shanmugam
Marked as answer
DM
Dmitriy
March 31, 2021 01:03 PM UTC
Hi!
That's awesome!
Thank you!
RS
Ruba Shanmugam
Syncfusion Team
April 1, 2021 06:09 AM UTC
Hi Dmitriy,
Thanks for the update. Let us know, if you need any further assistance.
Regards,
Ruba Shanmugam
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
- Marked answer
-
DM Dmitriy
- Mar 29, 2021 02:58 PM UTC
- Apr 1, 2021 06:09 AM UTC