Replies: 1 comment
-
|
Another example: Having "Recently opened" submenu in "File" that is dynamic - if user opens a new document, that menu would change. So there is a need to add/remove/insert and enable/disable new menu items on the fly. Currently it is only possible with a "hack" where I save recently opened items to application cache (.cache/ folder on linux) and then the menu changes only after user reopens the app. Useful but not ideal. Maybe I should switch to Tauri and DioxusWeb? But that does sound like a downgrade. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So, when building a menu item I have an option to set it to
enabled:How can I in dioxus component mutate this state? I know how I can react to menu being selected, but what about mutation?
Scenario: I'm writing a map editor - I want to disable "Save" option until user actually creates or opens the document.
AFAIK
mudaitems are using internallyRcso the whole thing lacksSend. I cannot use it as a context, I cannot save it as a static variable... Is it possible then?In tauri examples they mutate the menu item but inside of
app.on_menu_event(https://v2.tauri.app/learn/window-menu/#change-menu-status). I guess with Dixous it is another story?Beta Was this translation helpful? Give feedback.
All reactions