Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoCompleteTextField doesn't work correctly when using explicit dependency resolution #654

Open
codychaplin opened this issue Apr 15, 2024 · 0 comments

Comments

@codychaplin
Copy link

Long story short, I discovered that, at least on Android, the dropdown menu doesn't show up at all while typing when the ItemsSource is bound using a viewmodel that was set via Handler.MauiContext.Services.GetService<>(). https://github.com/dotnet/docs-maui/blob/main/docs/fundamentals/dependency-injection.md#explicit-dependency-resolution

I made a repo to test it here: https://github.com/codychaplin/UraniumUITest. The AutoCompleteTextField works correctly when using constructor dependency injection, but not when using explicit dependency resolution. My repo shows the ItemsSource for 4 different AutoCompleteTextFields getting set in different ways. All ways work except for the one I described above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant