mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-02-12 16:52:51 +00:00
Merge pull request #104 from dougborg/fix/tag-value-clear-on-done
Fix tag value reappearing after clearing and pressing Done
This commit is contained in:
@@ -132,7 +132,14 @@ class _NSITagValueFieldState extends State<NSITagValueField> {
|
|||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
widget.onChanged(value);
|
widget.onChanged(value);
|
||||||
},
|
},
|
||||||
onSubmitted: (_) => onFieldSubmitted(),
|
onSubmitted: (_) {
|
||||||
|
// Only auto-complete when there's text to match against.
|
||||||
|
// Otherwise, pressing Done on an empty field would auto-select
|
||||||
|
// the first suggestion, preventing users from clearing values.
|
||||||
|
if (controller.text.isNotEmpty) {
|
||||||
|
onFieldSubmitted();
|
||||||
|
}
|
||||||
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
optionsViewBuilder: (
|
optionsViewBuilder: (
|
||||||
|
|||||||
Reference in New Issue
Block a user