openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

Allow default action of Split Menu Button to be disabled while menu button is still enabled

Open johannadke opened this issue 5 months ago • 3 comments

Why are you proposing this feature?

I want to use a split menu button in a table toolbar to group buttons semantically. The default action of the Split Menu Button is an action that is done on the selected items in the table and in the menu, there is the equivalent action for all items. When no item is selected in the table I want to disable the default action, as the action cannot be performed when no item is selected. However disabling the Menu Button would mean, that the 'All action' can also not be performed and it should be.

How should a possible solution look like?

I want to have the option (e.g. a property) to disable the default action of the Split Menu Button and still have the Menu part enabled.

Are there alternative approaches?

A workaround is showing the user after the button click, that they should select an item. However this not a good user experience as if the action is not possible, the user should not be able to do the action.

Any further information you would like to share?

No response

johannadke avatar Aug 14 '25 08:08 johannadke

Hello @johannadke,

Thank you for sharing your enhancement proposal. I've created an internal incident DINC0607548. The status of the issue will be updated here in GitHub.

Regards, Siyana

s-todorova avatar Aug 14 '25 10:08 s-todorova

Hi @johannadke,

Have you tried on defaultAction event to check whether there's a table item selected and if yes - do the needful, if no - don't?

Regards, Diana

DMihaylova avatar Aug 28 '25 06:08 DMihaylova

Hi @DMihaylova,

yes, that is the workaround. However from a UX perspective the user then sees the enabled button which indicates that the action is possible (however it is not). Currently I am am then showing the user if they have no item in the table selected, that the action is not possible with an error message. However a better interaction would be to disable the button so that the user then directly sees that the action is not possible. By beeing able to disable the button we can prevent the error from happening which is in my case and also in general a better user flow. However since currently disabling the button also disables the other actions that are independent of the table selection, this is not possible at the moment for us.

Kind regards, Johanna

johannadke avatar Aug 28 '25 11:08 johannadke