mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: context menu now opens behind the icon as well
This commit is contained in:
parent
a71c5c0ee5
commit
72c5c937ae
@ -42,7 +42,17 @@ class ViewSectionItem extends StatelessWidget {
|
||||
],
|
||||
child: BlocBuilder<ViewBloc, ViewState>(
|
||||
builder: (context, state) {
|
||||
return Padding(
|
||||
return ViewDisclosureRegion(
|
||||
onTap: () => context
|
||||
.read<ViewBloc>()
|
||||
.add(const ViewEvent.setIsEditing(true)),
|
||||
onSelected: (action) {
|
||||
context
|
||||
.read<ViewBloc>()
|
||||
.add(const ViewEvent.setIsEditing(false));
|
||||
_handleAction(context, action);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
||||
child: InkWell(
|
||||
onTap: () => onSelected(context.read<ViewBloc>().state.view),
|
||||
@ -53,7 +63,7 @@ class ViewSectionItem extends StatelessWidget {
|
||||
setSelected: () => state.isEditing || isSelected,
|
||||
),
|
||||
),
|
||||
);
|
||||
));
|
||||
},
|
||||
),
|
||||
);
|
||||
@ -85,20 +95,13 @@ class ViewSectionItem extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
return ViewDisclosureRegion(
|
||||
onTap: () =>
|
||||
context.read<ViewBloc>().add(const ViewEvent.setIsEditing(true)),
|
||||
onSelected: (action) {
|
||||
context.read<ViewBloc>().add(const ViewEvent.setIsEditing(false));
|
||||
_handleAction(context, action);
|
||||
},
|
||||
child: SizedBox(
|
||||
return SizedBox(
|
||||
height: 26,
|
||||
child: Row(children: children).padding(
|
||||
left: MenuAppSizes.expandedPadding,
|
||||
right: MenuAppSizes.headerPadding,
|
||||
),
|
||||
));
|
||||
);
|
||||
}
|
||||
|
||||
void _handleAction(
|
||||
|
Loading…
Reference in New Issue
Block a user