diff --git a/lib/common/widgets/organisations_dialog.dart b/lib/common/widgets/organisations_dialog.dart index 94e4180..9666b96 100644 --- a/lib/common/widgets/organisations_dialog.dart +++ b/lib/common/widgets/organisations_dialog.dart @@ -91,8 +91,13 @@ class FindOrganisations { ignoring: _searchEnabled, child: RaisedButton( onPressed: () { - _submitSearch(searchBarText.text); - setState(() => {}); + if (_searchEnabled) { + var result = _submitSearch( + searchBarText.text); + result.then((_) { + setState(() {}); + }); + } }, child: Icon(Icons.search, color: Colors.white),