Thank you for the discussion, and all the details and your recommendations Albert. I just had the chance to try using Menu instead of ToolbarItemGroup and it worked just fine, without any workarounds.
Leaving the final code as a reference:
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
Menu {
Button("ft_commons_edit".localised, systemImage: "pencil") {
viewModel.didTapEditAction()
}
Button("ft_commons_delete".localised, systemImage: "trash") {
viewModel.didTapDeleteAction()
}
} label: {
Image("edit-icon")
.resizable()
.frame(width: 24.0, height: 24.0)
}
}
}
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: