@@ -61,7 +61,7 @@ class FormBuilderSearchableDropdown<T> extends FormBuilderField {
61
61
this .disabledHint,
62
62
this .icon = const Icon (Icons .arrow_drop_down),
63
63
this .underline,
64
- this .doneButton,
64
+ this .doneButton = 'Done' ,
65
65
this .label,
66
66
this .closeButton = 'Close' ,
67
67
this .displayClearIcon = true ,
@@ -101,12 +101,13 @@ class FormBuilderSearchableDropdown<T> extends FormBuilderField {
101
101
enabled: state.readOnly,
102
102
errorText: decoration? .errorText ?? field.errorText,
103
103
),
104
- child: SearchableDropdown .single (
104
+ child: /*SearchableDropdown.single(
105
+ value: state.value,
105
106
items: items,
106
- onChanged: (val){
107
+ onChanged: (val) {
108
+ state.requestFocus();
107
109
state.didChange(val);
108
110
},
109
- // value: state.value,
110
111
style: style,
111
112
searchHint: searchHint,
112
113
hint: hint,
@@ -128,13 +129,48 @@ class FormBuilderSearchableDropdown<T> extends FormBuilderField {
128
129
selectedValueWidgetFn: selectedValueWidgetFn,
129
130
keyboardType: keyboardType,
130
131
validator: validator,
131
- // assertUniqueValue: assertUniqueValue,
132
132
displayItem: displayItem,
133
133
dialogBox: dialogBox,
134
134
menuConstraints: menuConstraints,
135
135
readOnly: readOnly,
136
136
menuBackgroundColor: menuBackgroundColor,
137
- ),
137
+ assertUniqueValue: assertUniqueValue,
138
+ )*/
139
+ SearchableDropdown .multiple (
140
+ items: items,
141
+ onChanged: (val) {
142
+ state.requestFocus ();
143
+ state.didChange (val);
144
+ },
145
+ style: style,
146
+ searchHint: searchHint,
147
+ hint: hint,
148
+ disabledHint: disabledHint,
149
+ icon: icon,
150
+ underline: underline,
151
+ doneButton: doneButton,
152
+ label: label,
153
+ closeButton: closeButton,
154
+ displayClearIcon: displayClearIcon,
155
+ clearIcon: clearIcon,
156
+ iconEnabledColor: iconEnabledColor,
157
+ iconDisabledColor: iconDisabledColor,
158
+ iconSize: iconSize,
159
+ isExpanded: isExpanded,
160
+ isCaseSensitiveSearch: isCaseSensitiveSearch,
161
+ searchFn: searchFn,
162
+ onClear: onClear,
163
+ selectedValueWidgetFn: selectedValueWidgetFn,
164
+ keyboardType: keyboardType,
165
+ validator: validator,
166
+ displayItem: displayItem,
167
+ dialogBox: dialogBox,
168
+ menuConstraints: menuConstraints,
169
+ readOnly: readOnly,
170
+ menuBackgroundColor: menuBackgroundColor,
171
+ selectedItems: ,
172
+ )
173
+ ,
138
174
);
139
175
},
140
176
);
0 commit comments