openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

[Feature Request] sap.m.MenuButton event "arrowButtonPressed" / "beforeMenuOpen"

Open lhendrik opened this issue 5 years ago • 5 comments

Would it be possible to introduce a second event at sap.m.MenuButton besides the defaultAction event for the case the "arrowButton" is pressed / before the menu is opend?

Use case: Update the menu / the menu items every time before the menu is opend.

lhendrik avatar May 11 '21 14:05 lhendrik

Hello @lhendrik,

Thank you for sharing this finding. I've created an internal incident 2180148134. The status of the issue will be updated here in GitHub.

Best Regards

JumpNRun avatar May 12 '21 10:05 JumpNRun

Hello @lhendrik,

Thanks for sharing your use case, we'll need more info in regards to that. Why the items are not loaded during the instantiation? If your need is to have them lazy loaded have you thought of how the user will be indicated that after a click over the arrow, there'll be some delay until the list opening?

Thanks & Regards, Diana

DMihaylova avatar Jun 09 '21 06:06 DMihaylova

Hello @DMihaylova,

thanks for your response.

The items should be loaded at latest possible as they can change (in OData response). I tested it by introducing an custom Event on the sap.m.MenuButton, yes, of course there is a delay when the user clicks on the arrow and the items are loaded then before diyplayed. Until now this delay was small enough as the number of items is small. Nevertheless i understand your point.

Regards lhendrik

lhendrik avatar Jun 10 '21 14:06 lhendrik

Hello @lhendrik,

Now there's new "beforeMenuOpen" event available in master and will be part of version 1.94 :)

Thanks & Regards, Diana

DMihaylova avatar Jul 30 '21 14:07 DMihaylova

Thanks for introducing the new event

lhendrik avatar Aug 02 '21 13:08 lhendrik