RadAutoComplete now allow put Entry into popup

0 Answers 112 Views
Entry Popup
Arkady
Top achievements
Rank 1
Iron
Iron
Arkady asked on 21 Sep 2022, 03:19 PM

Hi, I found very useful new component RadAutoComplete and create Recipient input control which is loading filtered list from API, is working good. But i found an issue - i'm create Entry input inside the No results template (see below) and it works just fine on MacOS but not working on Windows, i cannot input (focus) Entry inside the popup, is just nothing happens when i click on it.

Arkady
Top achievements
Rank 1
Iron
Iron
commented on 21 Sep 2022, 03:20 PM | edited

Here is my code


<telerikControls:RadAutoComplete x:Name="RecipientsAutoComplete" Grid.ColumnSpan="7" 
                                                         Placeholder="Enter Name, Email or Mobile No" 
                                                         Style="{StaticResource RecipientsFilterAutoComplete}"
                                                         ItemsSource="{Binding ViewModel.AutoCompleteSource}"
                                                         SearchThreshold="2"
                                                         LoadingTemplate="{StaticResource ProgressIndicatorAutoComplete}"
                                                         NoResultsTemplate="{StaticResource EmptyAutoComplete}"
                                                         SuggestionItemTemplate="{StaticResource AutoCompleteRow}"
                                                         CompletionMode="Contains"
                                                         SuggestMode="SuggestAppend"
                                                         DisplayMode="Tokens"
                                                         TextSearchPath="Name"
                                                         TextChanged="RadAutoComplete_TextChanged">

<DataTemplate x:Key="EmptyAutoComplete">
                <Grid RowDefinitions="Auto,*">
                    <Grid ColumnDefinitions="*,*,*,Auto" Padding="5" ColumnSpacing="5">
                        <Entry HorizontalOptions="Fill" Placeholder="Name" Text="{Binding ViewModel.RecipientName}" />
                        <Entry Grid.Column="1" HorizontalOptions="Fill" Placeholder="Email" Text="{Binding ViewModel.RecipientEmail}" />
                        <Entry Grid.Column="2" HorizontalOptions="Fill" Placeholder="Mobile No" Text="{Binding ViewModel.RecipientMobileNo}" />
                        <ImageButton Grid.Column="3" BorderColor="Transparent" BackgroundColor="Transparent" Source="{x:Static eres:Images.SharePersonAdd}" 
                                     WidthRequest="30" HeightRequest="40" Padding="0,10" Command="{Binding AddRecipientCommand}"/>
                    </Grid>
                    <Label Grid.Row="1" Text="No match was found for the specific search. Please try again."
                           HorizontalOptions="Center" VerticalOptions="Center"
                           TextColor="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource Dark}}" />
                </Grid>
            </DataTemplate>

Didi
Telerik team
commented on 22 Sep 2022, 07:14 AM

Hi Arcady,

The AutoComplete control was just released with the R3 2022 release of Telerik UI for MAUI. Thank you for your feedback.

Could you please share what is the exact scenario you want to achieve with entries inside the suggestion view? I am asking as the entry is an input control and the focus is for the AutoComplete control, it does not propagate to the suggestion view. 
I have tried also on Android and you can focus the Entry but cannot type in it as the focus is inside the AutoComplete input field (Which is also an Entry control).  

Arkady
Top achievements
Rank 1
Iron
Iron
commented on 22 Sep 2022, 05:52 PM | edited

My case is - i have popup to specify options and allow user choose recipients, user can key in name,email or mobile and get suggestions from existing recipients and if there is no one found (see below), app will allow user to create new one by specify name, email and mobile. I found the idea to show Entry controls inside popup good enough UX, let it avoid any extra popups or controls. Straight forward user experience - if need to add recipient, just start typing whatever you know (name,email or mobile) then choose one from existing, but if no such recipient exist can add new one just here. Ah, forgot to mention - it work just fine in Mac OS :).

Arkady
Top achievements
Rank 1
Iron
Iron
commented on 22 Sep 2022, 05:58 PM

Somehow cannot change screenshots while editing comment, not sure why.

Didi
Telerik team
commented on 23 Sep 2022, 11:44 AM

Hi Arkady,

Thank you for the detailed explanation.

I have logged this behavior as a bug report, as the input controls inside the AutoComplete suggestion do not behave as expected: https://feedback.telerik.com/maui/1580941-autocomplete-android-winui-input-controls-are-not-focusable-in-the-templates  On Android the focus in on the main input area - autocomplete input field and do not propagate in the template. on WinUI the entries inside the no results template cannot be focused. 

I cannot suggest a workaround for this behavior using the no results template. You can add an external UI for this scenario. 

Sorry for the inconvenience. 

No answers yet. Maybe you can help?

Tags
Entry Popup
Asked by
Arkady
Top achievements
Rank 1
Iron
Iron
Share this question
or