Skip to content

Commit

Permalink
feat: [DX-3575] Add groups support to OptimusSelectInputFormField
Browse files Browse the repository at this point in the history
  • Loading branch information
witwash committed Dec 9, 2024
1 parent 636e4f6 commit 5195b15
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions optimus/lib/src/form/select_input_form_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class OptimusSelectInputFormField<T> extends FormField<T> {
required List<OptimusDropdownTile<T>> items,
ValueChanged<T>? onChanged,
bool allowMultipleSelection = false,
Grouper<T>? grouper,
GroupBuilder? groupBuilder,
List<T>? values,
}) : super(
builder: (FormFieldState<T> field) => OptimusSelectInput<T>(
Expand All @@ -31,6 +33,8 @@ class OptimusSelectInputFormField<T> extends FormField<T> {
},
allowMultipleSelection: allowMultipleSelection,
selectedValues: allowMultipleSelection ? values : null,
groupBy: grouper,
groupBuilder: groupBuilder,
),
);
}

0 comments on commit 5195b15

Please sign in to comment.