Skip to content

Commit 8c544f6

Browse files
feat: Set show search field by default
1 parent ece8a40 commit 8c544f6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

example/lib/main.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class _MyHomePageState extends State<MyHomePage> {
5757
child: Column(
5858
children: [
5959
FormBuilderSearchableDropdown<String>(
60-
popupProps: const PopupProps.menu(showSearchBox: true),
6160
name: 'searchable_dropdown_online',
6261
onChanged: _onChanged,
6362
asyncItems: (filter) async {

lib/src/fields/form_builder_searchable_dropdown.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,10 @@ class FormBuilderSearchableDropdown<T> extends FormBuilderField<T> {
129129
this.shouldRequestFocus = false,
130130
@Deprecated('Please use [clearButtonProps] instead')
131131
this.showClearButton = false,
132-
this.popupProps = const PopupProps.menu(fit: FlexFit.loose),
132+
this.popupProps = const PopupProps.menu(
133+
showSearchBox: true,
134+
fit: FlexFit.loose,
135+
),
133136
this.clearButtonProps,
134137
this.dropdownSearchTextStyle,
135138
this.dropdownButtonProps,
@@ -174,7 +177,6 @@ class FormBuilderSearchableDropdown<T> extends FormBuilderField<T> {
174177
baseStyle: dropdownSearchTextStyle,
175178
),
176179
filterFn: filterFn,
177-
// isFilteredOnline: isFilteredOnline,
178180
items: items,
179181
itemAsString: itemAsString,
180182
onBeforeChange: onBeforeChange,

0 commit comments

Comments
 (0)