🐛 Bug fixes on something

This commit is contained in:
2024-12-23 21:55:07 +08:00
parent 3eda464e03
commit 36a5b8fb39
11 changed files with 33 additions and 40 deletions

View File

@ -282,20 +282,6 @@ class _PostCategoriesFieldState extends State<PostCategoriesField> {
: null,
),
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
onChanged: (value) {
for (final divider in kTagsDividers) {
if (value.endsWith(divider)) {
final tagValue = value.substring(0, value.length - 1);
if (tagValue.isEmpty) return;
if (!_currentCategories.contains(tagValue)) {
setState(() => _currentCategories.add(tagValue));
}
controller.clear();
widget.onUpdate(_currentCategories);
break;
}
}
},
onSubmitted: (_) {
onSubmitted();
},