Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

fix: making selection in grid/kanban sometimes results in a create option

Richard Shiuea4d1c614ac7a
diff --git a/frontend/app_flowy/lib/plugins/grid/application/cell/select_option_editor_bloc.dart b/frontend/app_flowy/lib/plugins/grid/application/cell/select_option_editor_bloc.dart
index 03abe5f9c9..cd4ab22ec6 100644
--- a/frontend/app_flowy/lib/plugins/grid/application/cell/select_option_editor_bloc.dart
+++ b/frontend/app_flowy/lib/plugins/grid/application/cell/select_option_editor_bloc.dart
@@ -103,19 +103,11 @@ class SelectOptionCellEditorBloc
void _filterOption(String optionName, Emitter<SelectOptionEditorState> emit) {
final _MakeOptionResult result =
_makeOptions(Some(optionName), state.allOptions);
- if (optionName.isEmpty) {
- emit(state.copyWith(
- filter: Some(optionName),
- options: result.options,
- createOption: none(),
- ));
- } else {
- emit(state.copyWith(
- filter: Some(optionName),
- options: result.options,
- createOption: result.createOption,
- ));
- }
+ emit(state.copyWith(
+ filter: Some(optionName),
+ options: result.options,
+ createOption: result.createOption,
+ ));
}
void _loadOptions() {
@@ -155,6 +147,9 @@ class SelectOptionCellEditorBloc
return name.contains(lFilter);
});
}
+ else {
+ createOption = none();
+ }
});
return _MakeOptionResult(