mirror of
				https://github.com/AppFlowy-IO/AppFlowy.git
				synced 2025-10-31 10:03:18 +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, |             selectedOptionMap: optionMap, | ||||||
|             distanceToText: _editorPannelWidth * 0.7, |             distanceToText: _editorPannelWidth * 0.7, | ||||||
|             tagController: _tagController, |             tagController: _tagController, | ||||||
|  |             onClick: () => FlowyOverlay.of(context).remove(SelectOptionTypeOptionEditor.identifier), | ||||||
|             newText: (text) { |             newText: (text) { | ||||||
|               context.read<SelectOptionCellEditorBloc>().add(SelectOptionEditorEvent.filterOption(text)); |               context.read<SelectOptionCellEditorBloc>().add(SelectOptionEditorEvent.filterOption(text)); | ||||||
|             }, |             }, | ||||||
|  | |||||||
| @ -22,6 +22,7 @@ class SelectOptionTextField extends StatelessWidget { | |||||||
| 
 | 
 | ||||||
|   final Function(String) onNewTag; |   final Function(String) onNewTag; | ||||||
|   final Function(String) newText; |   final Function(String) newText; | ||||||
|  |   final VoidCallback? onClick; | ||||||
| 
 | 
 | ||||||
|   SelectOptionTextField({ |   SelectOptionTextField({ | ||||||
|     required this.options, |     required this.options, | ||||||
| @ -30,6 +31,7 @@ class SelectOptionTextField extends StatelessWidget { | |||||||
|     required this.tagController, |     required this.tagController, | ||||||
|     required this.onNewTag, |     required this.onNewTag, | ||||||
|     required this.newText, |     required this.newText, | ||||||
|  |     this.onClick, | ||||||
|     TextEditingController? controller, |     TextEditingController? controller, | ||||||
|     FocusNode? focusNode, |     FocusNode? focusNode, | ||||||
|     Key? key, |     Key? key, | ||||||
| @ -53,6 +55,7 @@ class SelectOptionTextField extends StatelessWidget { | |||||||
|             autofocus: true, |             autofocus: true, | ||||||
|             controller: editController, |             controller: editController, | ||||||
|             focusNode: focusNode, |             focusNode: focusNode, | ||||||
|  |             onTap: onClick, | ||||||
|             onChanged: (text) { |             onChanged: (text) { | ||||||
|               if (onChanged != null) { |               if (onChanged != null) { | ||||||
|                 onChanged(text); |                 onChanged(text); | ||||||
|  | |||||||
| @ -25,6 +25,8 @@ class SelectOptionTypeOptionEditor extends StatelessWidget { | |||||||
|     Key? key, |     Key? key, | ||||||
|   }) : super(key: key); |   }) : super(key: key); | ||||||
| 
 | 
 | ||||||
|  |   static String get identifier => (SelectOptionTypeOptionEditor).toString(); | ||||||
|  | 
 | ||||||
|   @override |   @override | ||||||
|   Widget build(BuildContext context) { |   Widget build(BuildContext context) { | ||||||
|     return BlocProvider( |     return BlocProvider( | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Nathan.fooo
						Nathan.fooo