This commit is contained in:
Hillel Coren 2020-02-12 16:17:17 +02:00
parent 0501695c7d
commit c84a48eddc
2 changed files with 21 additions and 4 deletions

View File

@ -115,9 +115,10 @@ class _EntityDropdownState extends State<EntityDropdown> {
return TypeAheadFormField<String>( return TypeAheadFormField<String>(
noItemsFoundBuilder: (context) => SizedBox(), noItemsFoundBuilder: (context) => SizedBox(),
suggestionsBoxDecoration: SuggestionsBoxDecoration( suggestionsBoxDecoration: SuggestionsBoxDecoration(
constraints: BoxConstraints( constraints: BoxConstraints(
minWidth: 300, minWidth: 300,
)), ),
),
suggestionsCallback: (filter) { suggestionsCallback: (filter) {
return (widget.entityList ?? widget.entityMap.keys.toList()) return (widget.entityList ?? widget.entityMap.keys.toList())
.where((entityId) => .where((entityId) =>
@ -165,8 +166,8 @@ class _EntityDropdownState extends State<EntityDropdown> {
: SizedBox(), : SizedBox(),
), ),
), ),
autoFlipDirection: true,
//direction: AxisDirection.up, //direction: AxisDirection.up,
autoFlipDirection: true,
animationStart: 1, animationStart: 1,
debounceDuration: Duration(seconds: 0), debounceDuration: Duration(seconds: 0),
); );

View File

@ -261,6 +261,12 @@ class ReportResult {
return DataRow(cells: [ return DataRow(cells: [
for (String column in columns) for (String column in columns)
DataCell(TypeAheadFormField( DataCell(TypeAheadFormField(
noItemsFoundBuilder: (context) => SizedBox(),
suggestionsBoxDecoration: SuggestionsBoxDecoration(
constraints: BoxConstraints(
minWidth: 300,
),
),
suggestionsCallback: (filter) { suggestionsCallback: (filter) {
filter = filter.toLowerCase(); filter = filter.toLowerCase();
final index = columns.indexOf(column); final index = columns.indexOf(column);
@ -281,7 +287,17 @@ class ReportResult {
}, },
textFieldConfiguration: TextFieldConfiguration<String>( textFieldConfiguration: TextFieldConfiguration<String>(
controller: textEditingControllers[column], controller: textEditingControllers[column],
decoration: InputDecoration(
suffix: IconButton(
icon: Icon(Icons.clear),
onPressed: () {
//
},
)),
), ),
autoFlipDirection: true,
animationStart: 1,
debounceDuration: Duration(seconds: 0),
)) ))
]); ]);
} }