diff --git a/CHANGELOG.md b/CHANGELOG.md index a5a0e3de..0621916b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - fix: Correctly unfocus `NumberBox` when user taps outside ([#1135](https://github.com/bdlukaa/fluent_ui/issues/1135)) - fix: Do try to scroll Date and Time at build time ([#1117](https://github.com/bdlukaa/fluent_ui/issues/1117)) - feat: Use a `Decoration` instead of `Color` in `NavigationAppBar` ([#1118](https://github.com/bdlukaa/fluent_ui/issues/1118)) +- feat: Add `EditableComboBox.inputFormatters` ([#1041](https://github.com/bdlukaa/fluent_ui/issues/1041)) ## 4.9.2 diff --git a/lib/src/controls/form/editable_combo_box.dart b/lib/src/controls/form/editable_combo_box.dart index 3537d2de..c21f67a8 100644 --- a/lib/src/controls/form/editable_combo_box.dart +++ b/lib/src/controls/form/editable_combo_box.dart @@ -34,6 +34,7 @@ class EditableComboBox extends ComboBox { required this.onFieldSubmitted, this.textController, this.onTextChanged, + this.inputFormatters, // When adding new arguments, consider adding similar arguments to // EditableComboboxFormField. }); @@ -76,6 +77,9 @@ class EditableComboBox extends ComboBox { /// * [onChanged], which is called when the selected value changes. final ValueChanged? onTextChanged; + /// {@macro flutter.widgets.editableText.inputFormatters} + final List? inputFormatters; + @override State> createState() => _EditableComboboxState(); } @@ -188,6 +192,7 @@ class _EditableComboboxState extends ComboBoxState { _setText(newText); }, onChanged: widget.onTextChanged, + inputFormatters: widget.inputFormatters, ), ); } @@ -363,6 +368,7 @@ class EditableComboboxFormField extends FormField { AlignmentGeometry alignment = AlignmentDirectional.centerStart, BorderRadius? borderRadius, required SubmitEditableCombobox onFieldSubmitted, + List? inputFormatters, // When adding new arguments, consider adding similar arguments to // EditableComboBox. }) : super(builder: (FormFieldState field) { @@ -399,6 +405,7 @@ class EditableComboboxFormField extends FormField { autofocus: autofocus, popupColor: popupColor, onFieldSubmitted: onFieldSubmitted, + inputFormatters: inputFormatters, ), ), );