Skip to content

Commit

Permalink
Resolves #319 (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
awhitford authored Jun 15, 2020
1 parent 59d0b62 commit dcf7078
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/src/fields/form_builder_typeahead.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ class _FormBuilderTypeAheadState<T> extends State<FormBuilderTypeAhead<T>> {
? _formState.initialValue[widget.attribute]
: null);

_initialText = (widget.selectionToTextTransformer != null)
? widget.selectionToTextTransformer(_initialValue ?? '')
: _initialValue?.toString() ?? '';
_initialText = ((widget.selectionToTextTransformer != null)
? widget.selectionToTextTransformer(_initialValue)
: _initialValue?.toString()) ??
'';

_typeAheadController.text = _initialText;

Expand Down

0 comments on commit dcf7078

Please sign in to comment.