From cda3fc57e9ecd6ccdc3c8aac6c910eaaaea5516a Mon Sep 17 00:00:00 2001 From: Felix Date: Mon, 19 Aug 2019 15:36:41 +0100 Subject: [PATCH] fix broken dialog --- lib/common/widgets/organisations_dialog.dart | 11 ++++++++--- lib/pages/receipt_page_2.dart | 2 -- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/common/widgets/organisations_dialog.dart b/lib/common/widgets/organisations_dialog.dart index 30b79b5..4a55641 100644 --- a/lib/common/widgets/organisations_dialog.dart +++ b/lib/common/widgets/organisations_dialog.dart @@ -134,12 +134,17 @@ class FindOrganisations { } setState(() => {_searchEnabled}); }, - onSubmitted: _searchEnabled ? (_) { + onSubmitted: ((_) { + if (_searchEnabled) { + SystemChannels.textInput.invokeMethod('TextInput.hide'); var result = _submitSearch(searchBarText.text); result.then((_) { - setState(() {}); + setState(() { + _orgsFetched = true; + }); }); - } : null, + } + }), ), ), diff --git a/lib/pages/receipt_page_2.dart b/lib/pages/receipt_page_2.dart index 1467d10..70d67f1 100644 --- a/lib/pages/receipt_page_2.dart +++ b/lib/pages/receipt_page_2.dart @@ -241,8 +241,6 @@ class ReceiptPage2State extends State { height: 32.0, child: RaisedButton( onPressed: () { - // var popupListView = new PopupListView(); - // var dialog = popupListView.dialog(context, optionsList, "Choose Organization"); var organisations = new FindOrganisations(); var orgDialog = organisations.dialog(context); orgDialog.then((organisation) {