You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, when building a menu item I have an option to set it to enabled:
let save_menu = MenuItem::with_id(MENU_SAVE,"Save map",false,Accelerator::from_str("CMDORCTRL+S").ok(),);
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 muda items are using internally Rc so the whole thing lacks Send. I cannot use it as a context, I cannot save it as a static variable... Is it possible then?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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