mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
Merge pull request #1017 from richardshiue/fix-empty-create-select-tag
fix: empty create option in select/multi-select properties
This commit is contained in:
commit
61ea7ea3df
@ -103,19 +103,11 @@ class SelectOptionCellEditorBloc
|
|||||||
void _filterOption(String optionName, Emitter<SelectOptionEditorState> emit) {
|
void _filterOption(String optionName, Emitter<SelectOptionEditorState> emit) {
|
||||||
final _MakeOptionResult result =
|
final _MakeOptionResult result =
|
||||||
_makeOptions(Some(optionName), state.allOptions);
|
_makeOptions(Some(optionName), state.allOptions);
|
||||||
if (optionName.isEmpty) {
|
emit(state.copyWith(
|
||||||
emit(state.copyWith(
|
filter: Some(optionName),
|
||||||
filter: Some(optionName),
|
options: result.options,
|
||||||
options: result.options,
|
createOption: result.createOption,
|
||||||
createOption: none(),
|
));
|
||||||
));
|
|
||||||
} else {
|
|
||||||
emit(state.copyWith(
|
|
||||||
filter: Some(optionName),
|
|
||||||
options: result.options,
|
|
||||||
createOption: result.createOption,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _loadOptions() {
|
void _loadOptions() {
|
||||||
@ -154,6 +146,8 @@ class SelectOptionCellEditorBloc
|
|||||||
|
|
||||||
return name.contains(lFilter);
|
return name.contains(lFilter);
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
createOption = none();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user