diff --git a/mobile/lib/presentation/widgets/action_buttons/base_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/base_action_button.widget.dart index d55f5e25a..ee2dace72 100644 --- a/mobile/lib/presentation/widgets/action_buttons/base_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/base_action_button.widget.dart @@ -49,14 +49,21 @@ class BaseActionButton extends ConsumerWidget { if (menuItem) { final iconColor = this.iconColor; + final onPressed = this.onPressed; return MenuItemButton( + closeOnActivate: false, style: MenuItemButton.styleFrom( alignment: Alignment.centerLeft, padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14), ), leadingIcon: Icon(iconData, color: iconColor, size: 20), - onPressed: onPressed, + onPressed: onPressed == null + ? null + : () { + onPressed(); + MenuController.maybeOf(context)?.close(); + }, child: Text(label, style: TextStyle(fontSize: 15, color: iconColor)), ); }