TF-1539: Hide suggestion box after select item suggestion

(cherry picked from commit 1eed23a5090c92e969a47a842cb6a18ca1a667c6)
This commit is contained in:
ManhNTX
2023-03-13 09:30:28 +07:00
committed by Dat Vu
parent 4562e310bb
commit 8820cc537b
2 changed files with 2 additions and 2 deletions
@@ -33,7 +33,7 @@ class CustomController extends TextfieldTagsController {
@override
void onChanged(String value) {
final ts = [' ', ','];
final ts = [','];
final separator = ts.cast<String?>().firstWhere(
(element) => value.contains(element!) && value.indexOf(element) != 0,
orElse: () => null);
@@ -89,7 +89,7 @@ class _TextFieldAutoCompleteEmailAddressState
itemBuilder: (BuildContext context, int index) {
final emailAddress = listEmailAddress.elementAt(index);
return InkWell(
onTap: () => onSelected(emailAddress),
onTap: () {_controller.onSubmitted(emailAddress.emailAddress);},
child: _buildSuggestionItem(context, emailAddress),
);
},