mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: remove keyboard when tap outside text field (#4235)
This commit is contained in:
parent
54fcc4ac5b
commit
5cede74c89
@ -85,6 +85,11 @@ class _GroupCardHeaderState extends State<GroupCardHeader> {
|
||||
),
|
||||
maxLines: 1,
|
||||
style: titleTextStyle,
|
||||
onTapOutside: (_) => context.read<BoardBloc>().add(
|
||||
// group header switch from TextField to Text
|
||||
// group name won't be changed
|
||||
BoardEvent.endEditingHeader(widget.groupData.id, null),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ class BoardBloc extends Bloc<BoardEvent, BoardState> {
|
||||
state.copyWith(isEditingHeader: true, editingHeaderId: groupId),
|
||||
);
|
||||
},
|
||||
endEditingHeader: (String groupId, String groupName) async {
|
||||
endEditingHeader: (String groupId, String? groupName) async {
|
||||
await groupBackendSvc.updateGroup(
|
||||
fieldId: groupControllers.values.first.group.fieldId,
|
||||
groupId: groupId,
|
||||
@ -505,7 +505,7 @@ class BoardEvent with _$BoardEvent {
|
||||
const factory BoardEvent.createGroup(String name) = _CreateGroup;
|
||||
const factory BoardEvent.startEditingHeader(String groupId) =
|
||||
_StartEditingHeader;
|
||||
const factory BoardEvent.endEditingHeader(String groupId, String groupName) =
|
||||
const factory BoardEvent.endEditingHeader(String groupId, String? groupName) =
|
||||
_EndEditingHeader;
|
||||
const factory BoardEvent.didCreateRow(
|
||||
GroupPB group,
|
||||
|
Loading…
Reference in New Issue
Block a user