Skip to content
Snippets Groups Projects
Commit 5b51a392 authored by Leon Tappe's avatar Leon Tappe :fire:
Browse files

fix remaining search term when emptying field too fast

parent 847b2a31
No related branches found
No related tags found
No related merge requests found
......@@ -61,7 +61,11 @@ class _UserListPageState extends State<UserListPage> {
title: TextField(
controller: _searchController,
onChanged: (String searchTerm) {
setState(() => _lastSearchTerm = searchTerm);
if (searchTerm.isEmpty) {
_onCancelSearch();
} else {
setState(() => _lastSearchTerm = searchTerm);
}
},
autocorrect: false,
decoration: InputDecoration(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment