The application we are building supports many actions that user can take on a particular record. Some of these actions are discovered at runtime depending on authorization or other features. When we are displaying multiple rows, it is very resource intensive to pre-calculate all available options and render in the beginning.
Instead we would like to calculate the options when user clicks on the menu. To enable these use cases, it would be really helpful if Menu supports dynamic loading of menu options.
It might work something like this.
onOpen callbackIf this is possible with current implementation, can you please hint how to show spinner in menu?
You don't show a spinner in a Menu, you show it in the Popover contents _in place of_ the Menu while the menu item data is loading.
@adidahiya makes sense. Thank you, will try and update this thread.
I could implement lazy loaded menu options using the approach suggested by @adidahiya so I think we are good now. Thanks for the help.
Most helpful comment
You don't show a spinner in a
Menu, you show it in thePopovercontents _in place of_ theMenuwhile the menu item data is loading.