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

Fix expression evaluation autocomplete bug #5717

Merged
merged 4 commits into from Apr 25, 2023

Conversation

elliette
Copy link
Member

Fixes #5710
Work towards #5703

Fixes the bug where selecting a field during expression evaluation would replace everything in the input, instead of everything up to the last dot (eg. myClass.someMetho -> enter to accept someMethod would replace all of myClass.someMetho with just someMethod).

@elliette elliette requested a review from a team as a code owner April 25, 2023 19:12
@elliette elliette requested review from bkonyi and removed request for a team April 25, 2023 19:12
final searchingValue = _autoCompleteController.search;

_autoCompleteController.clearCurrentSuggestion();

if (searchingValue.isNotEmpty) {
if (_autoCompleteController.selectTheSearch) {
_autoCompleteController.resetSearch();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resetting the search term here was the crux of the bug. This would clear whatever the user had already inputted.

@elliette elliette merged commit e4f512c into flutter:master Apr 25, 2023
14 checks passed
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

Successfully merging this pull request may close these issues.

Expression evaluation autocomplete replaces entire input
2 participants