diff --git a/CHANGELOG.md b/CHANGELOG.md index 89616a0..adc0756 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ * Added `validator` parameter. Now you can validate the autocomplete field inside a form * Added `progressIndicatorBuilder` parameter. Now you can add a custom progress indicator to be used in async suggestions fetch +### Fixed +* Fixed progress indicator appearing when regaining focus on element + ## 1.5.0 - [13-02-2022] ### Added diff --git a/README.md b/README.md index c26a410..5ce7f03 100644 --- a/README.md +++ b/README.md @@ -236,5 +236,6 @@ If you encounter any issue you or want to leave a suggestion you can do it by fi ## Contributions Here's the list of our awesome contributors: - [Prateek Sunal](https://github.com/prateekmedia) +- [Miklos Zsido](https://github.com/zsmiklos) ### Thank you for the support! diff --git a/lib/easy_autocomplete.dart b/lib/easy_autocomplete.dart index 1a5e7b7..b08bbec 100644 --- a/lib/easy_autocomplete.dart +++ b/lib/easy_autocomplete.dart @@ -199,7 +199,10 @@ class _EasyAutocompleteState extends State { void closeOverlay() { if (_hasOpenedOverlay) { _overlayEntry!.remove(); - setState(() => _hasOpenedOverlay = false); + setState(() { + _previousAsyncSearchText = ''; + _hasOpenedOverlay = false; + }); } }