From c84a48eddc137b3a2e5ec5d2a9dd4b350810b86d Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 12 Feb 2020 16:17:17 +0200 Subject: [PATCH] Reports --- lib/ui/app/entity_dropdown.dart | 9 +++++---- lib/ui/reports/reports_screen.dart | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/lib/ui/app/entity_dropdown.dart b/lib/ui/app/entity_dropdown.dart index 937f0e2f4..603861077 100644 --- a/lib/ui/app/entity_dropdown.dart +++ b/lib/ui/app/entity_dropdown.dart @@ -115,9 +115,10 @@ class _EntityDropdownState extends State { return TypeAheadFormField( noItemsFoundBuilder: (context) => SizedBox(), suggestionsBoxDecoration: SuggestionsBoxDecoration( - constraints: BoxConstraints( - minWidth: 300, - )), + constraints: BoxConstraints( + minWidth: 300, + ), + ), suggestionsCallback: (filter) { return (widget.entityList ?? widget.entityMap.keys.toList()) .where((entityId) => @@ -165,8 +166,8 @@ class _EntityDropdownState extends State { : SizedBox(), ), ), - autoFlipDirection: true, //direction: AxisDirection.up, + autoFlipDirection: true, animationStart: 1, debounceDuration: Duration(seconds: 0), ); diff --git a/lib/ui/reports/reports_screen.dart b/lib/ui/reports/reports_screen.dart index 0d0874d1a..4f62593aa 100644 --- a/lib/ui/reports/reports_screen.dart +++ b/lib/ui/reports/reports_screen.dart @@ -261,6 +261,12 @@ class ReportResult { return DataRow(cells: [ for (String column in columns) DataCell(TypeAheadFormField( + noItemsFoundBuilder: (context) => SizedBox(), + suggestionsBoxDecoration: SuggestionsBoxDecoration( + constraints: BoxConstraints( + minWidth: 300, + ), + ), suggestionsCallback: (filter) { filter = filter.toLowerCase(); final index = columns.indexOf(column); @@ -281,7 +287,17 @@ class ReportResult { }, textFieldConfiguration: TextFieldConfiguration( controller: textEditingControllers[column], + decoration: InputDecoration( + suffix: IconButton( + icon: Icon(Icons.clear), + onPressed: () { + // + }, + )), ), + autoFlipDirection: true, + animationStart: 1, + debounceDuration: Duration(seconds: 0), )) ]); }