|
@@ -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() {
|
|
@@ -154,6 +146,8 @@ class SelectOptionCellEditorBloc
|
|
|
|
|
|
return name.contains(lFilter);
|
|
|
});
|
|
|
+ } else {
|
|
|
+ createOption = none();
|
|
|
}
|
|
|
});
|
|
|
|