Skip to content

Commit 734af34

Browse files
authored
Merge pull request #196 from LahaLuhem/master
ReactiveCupertinoTypeAhead: use`formControl.field.enabled` instead of just `enabled` property
2 parents c4b7a5b + f50444c commit 734af34

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/reactive_flutter_typeahead/lib/src/reactive_cupertino_typeahead.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ class ReactiveCupertinoTypeAhead<T, V> extends ReactiveFormField<T, V> {
145145
}
146146

147147
return CupertinoTypeAheadField<V>(
148+
controller: controller,
148149
suggestionsCallback: suggestionsCallback,
149150
itemBuilder: itemBuilder,
150151
onSelected: (value) {
@@ -162,7 +163,7 @@ class ReactiveCupertinoTypeAhead<T, V> extends ReactiveFormField<T, V> {
162163
return CupertinoTextField(
163164
controller: controller,
164165
focusNode: focusNode,
165-
enabled: enabled,
166+
enabled: field.control.enabled,
166167
decoration: decoration,
167168
padding: padding,
168169
placeholder: placeholder,

packages/reactive_flutter_typeahead/lib/src/reactive_typeahead.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ class ReactiveTypeAhead<T, V> extends ReactiveFormField<T, V> {
118118
TextAlign textAlign = TextAlign.start,
119119
TextAlignVertical? textAlignVertical,
120120
TextEditingController? textEditingController,
121+
TextInputAction? textInputAction,
121122
bool autofocus = false,
122123
bool readOnly = false,
123124
bool? showCursor,
@@ -143,6 +144,7 @@ class ReactiveTypeAhead<T, V> extends ReactiveFormField<T, V> {
143144
}
144145

145146
return TypeAheadField<V>(
147+
controller: controller,
146148
suggestionsCallback: suggestionsCallback,
147149
itemBuilder: itemBuilder,
148150
onSelected: (value) {
@@ -171,6 +173,7 @@ class ReactiveTypeAhead<T, V> extends ReactiveFormField<T, V> {
171173
textDirection: textDirection,
172174
textAlign: textAlign,
173175
textAlignVertical: textAlignVertical,
176+
textInputAction: textInputAction,
174177
autofocus: autofocus,
175178
readOnly: readOnly,
176179
showCursor: showCursor,

0 commit comments

Comments
 (0)