Skip to content

Commit dcf7078

Browse files
authored
Resolves #319 (#320)
1 parent 59d0b62 commit dcf7078

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/src/fields/form_builder_typeahead.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,10 @@ class _FormBuilderTypeAheadState<T> extends State<FormBuilderTypeAhead<T>> {
111111
? _formState.initialValue[widget.attribute]
112112
: null);
113113

114-
_initialText = (widget.selectionToTextTransformer != null)
115-
? widget.selectionToTextTransformer(_initialValue ?? '')
116-
: _initialValue?.toString() ?? '';
114+
_initialText = ((widget.selectionToTextTransformer != null)
115+
? widget.selectionToTextTransformer(_initialValue)
116+
: _initialValue?.toString()) ??
117+
'';
117118

118119
_typeAheadController.text = _initialText;
119120

0 commit comments

Comments
 (0)