I am trying to populate a sub menu in main menu bar at the top. The number of menu actions in the submenu will be dependent on the data that is received from the backend. Is it possible to dynamically load menu actions based on json data received from backend? If not, is there any other way?
Hi @usmnzain,
Is this working for you? I am trying to do the same, but i’m not getting it working. I see the menus being added to the MenuRegistry, but not visible in the menu itself.
If you are in electron, you have to recreate the menus manually. Always. Here is an example.
If you are running in browser env and want to insert into the top-level menus (such as File, Edit, Your_Item, Run, etc.), you have to do the same. Drop the menus and recreate them from scratch. (Get inspired from the electron-based example.)
However, if you are in a browser env and want to modify a non-top-level menu item and it does not work, it’s most likely a bug, and we need a bug report with an example to reproduce.