flutter_typeahead icon indicating copy to clipboard operation
flutter_typeahead copied to clipboard

noItemsFoundBuilder not getting call if type ahead field is empty and return suggestions are also empty

Open iamrohitsuthar opened this issue 3 years ago • 2 comments

When TypeAheadField is focused initially and if we do not type anything and if SuggestionsCallback returns non-empty suggestions then suggestions list is shown. But if SuggestionsCallback returns empty suggestions then noItemsFoundBuilder should gets invoked but currently it not getting invoked.

If we type something in field and if suggestions are empty then in this case only noItemsFoundBuilder is invoked.

I have attached below outputs for better understanding.

When field is focused and we do not have type anything: non-empty suggestions in SuggestionsCallback

When field is focused and we do not have type anything: empty suggestions in SuggestionsCallback image

We have type something in field image

iamrohitsuthar avatar Jan 17 '22 07:01 iamrohitsuthar

I am facing exact same issue.

prathmesh-jadhav avatar May 19 '22 12:05 prathmesh-jadhav

If this is still the case in Flutter 3 / TypeAhead 4.x -- then if someone makes a PR with a test case I will merge.

sjmcdowall avatar May 23 '22 13:05 sjmcdowall