[Solved] AutoComplete control problem.

1 Answer 13 Views
AutoComplete
Wojtek
Top achievements
Rank 1
Wojtek asked on 08 Jun 2026, 12:04 PM
Hey,

I'm having a problem with auto complete control for Maui (this is Windows desktop app). In our app we have a view caching system which basically makes it a SPA application (what we do is we change the Contnet property dynamically of the container that should contain our views). The problem is as follows. Whenever we navigate between any view and back to the view where autocomplete resides, the keyboard navigation is treated as if it was attached once more (that's my assumption) - meaning that when we did one cycle of navigation (go to another view and back), trigger auto completion and press arrow down on keyboard it jumps two records down instead of one. The problem is incremental so when we do for example 4 cycles of navigation and press arrow down key, we jump 4 items down and the 4th item is highlighted.


            var autoCompleteEntry = new RadAutoComplete
            {
                BindingContext = _viewModel,
                Placeholder = $"Szukaj {field.Label}...",
                FontSize = 16,
                TextColor = NeucaColors.Font_CardFrame,
                BackgroundColor = Colors.White,
                CompletionMode = AutoCompleteCompletionMode.Contains,
                SuggestMode = AutoCompleteSuggestMode.Suggest,
                NoResultsMessage = $"Brak wyników dla {field.Label}",
                SearchThreshold = 3,
            };

            autoCompleteEntry.SetBinding(RadAutoComplete.TextProperty, new Binding(
                nameof(UIFieldConfig.FilterValue),
                source: field,
                mode: BindingMode.TwoWay
            ));

            autoCompleteEntry.HighlightItemFunc = (filteredItems, searchText) => null;

            autoCompleteEntry.TextChanged += AutoCompleteEntryOnTextChanged(field.FieldName);

            autoCompleteEntry.Completed +=
                dataGridContext == UIDataGridContext.Account
                    ? AccountOnAutoCompleteEntryCompleted
                    : ClientOnAutoCompleteEntryCompleted;

            autoCompleteEntry.SuggestionItemSelected +=
                dataGridContext == UIDataGridContext.Account
                    ? AccountOnAutoCompleteEntryOnSuggestionItemSelected
                    : ClientOnAutoCompleteEntryOnSuggestionItemSelected;

            autoCompleteEntry.SetBinding(WidthRequestProperty, new Binding(
                nameof(AccountsClientsViewModel.IsEditMode),
                source: _viewModel,
                converter: new BoolToObjectConverter { TrueObject = 250, FalseObject = 300 }
            ));

            dataRow.Children.Add(autoCompleteEntry);

Unfortunately i cannot provide more than the control initialization.

1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 08 Jun 2026, 03:07 PM

Hi Wojtek,

Thank you for the provided code.

I tested in a sample app with page navigation and cannot reproduce the behavior. I will need a sample repro project for further researching the case. If you do not want to share the project here in the forum, open a support ticket and attach the project there.

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Wojtek
Top achievements
Rank 1
commented on 10 Jun 2026, 03:16 PM | edited

Hi, 

I'm attaching the sample app with recreated problem. (Run it on windows platform)

All you have to do is just switch between View1 and View2 atleast once. Start typing apple in the autocomplete control and press arrow key down, to select any suggestion. It will jump x rows where x is count of navigation cycle between views.

Best Regards,
Wojtek
Wojtek
Top achievements
Rank 1
commented on 10 Jun 2026, 03:19 PM

Please see the attached app i provided in this thread.
Tags
AutoComplete
Asked by
Wojtek
Top achievements
Rank 1
Answers by
Didi
Telerik team
Share this question
or