Closed Pherne closed 1 year ago
Hello there ! Very good catch, indeed there was a bug. I have resolved it and now the showedItems
will no longer be shown when itemsVisibility == ShowedItemsVisibility.onType
& clearSearchFieldOnSelect == true
.
Will be available with the next release 2.4.4
, probably later today.
Current Behavior
The onType flag is used and clearSearchFieldOnSelect is set to true. After I have added an item to the pickedItems showedItems are visible. It works as intended when I manually empty the searchField.
Expected behavior/code
showedItems aren't visible after adding an item to the pickedItems when the onType flag is used and clearSearchFieldOnSelect is set to true
Possible Solution
Adding something along the lines of
setState(() => expanded = widget.itemsVisibility == ShowedItemsVisibility.onType && widget.searchFieldTextEditingController.text.isNotEmpty);
in the onTap of the GestureDetector in _buildShowedItems().