mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
Merge pull request #524 from moksh-mahajan/RenamingWindowAutoClose
fix: Close renaming window when creating another new option
This commit is contained in:
commit
0f71851433
@ -156,6 +156,7 @@ class _TextField extends StatelessWidget {
|
||||
selectedOptionMap: optionMap,
|
||||
distanceToText: _editorPannelWidth * 0.7,
|
||||
tagController: _tagController,
|
||||
onClick: () => FlowyOverlay.of(context).remove(SelectOptionTypeOptionEditor.identifier),
|
||||
newText: (text) {
|
||||
context.read<SelectOptionCellEditorBloc>().add(SelectOptionEditorEvent.filterOption(text));
|
||||
},
|
||||
|
@ -22,6 +22,7 @@ class SelectOptionTextField extends StatelessWidget {
|
||||
|
||||
final Function(String) onNewTag;
|
||||
final Function(String) newText;
|
||||
final VoidCallback? onClick;
|
||||
|
||||
SelectOptionTextField({
|
||||
required this.options,
|
||||
@ -30,6 +31,7 @@ class SelectOptionTextField extends StatelessWidget {
|
||||
required this.tagController,
|
||||
required this.onNewTag,
|
||||
required this.newText,
|
||||
this.onClick,
|
||||
TextEditingController? controller,
|
||||
FocusNode? focusNode,
|
||||
Key? key,
|
||||
@ -53,6 +55,7 @@ class SelectOptionTextField extends StatelessWidget {
|
||||
autofocus: true,
|
||||
controller: editController,
|
||||
focusNode: focusNode,
|
||||
onTap: onClick,
|
||||
onChanged: (text) {
|
||||
if (onChanged != null) {
|
||||
onChanged(text);
|
||||
|
@ -25,6 +25,8 @@ class SelectOptionTypeOptionEditor extends StatelessWidget {
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
|
||||
static String get identifier => (SelectOptionTypeOptionEditor).toString();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BlocProvider(
|
||||
|
Loading…
Reference in New Issue
Block a user