Skip to content

#173 feat: add updateTrayMenuItem helper to os api#184

Open
subhu339 wants to merge 1 commit intoneutralinojs:mainfrom
subhu339:fix/tray-menu-update-helper
Open

#173 feat: add updateTrayMenuItem helper to os api#184
subhu339 wants to merge 1 commit intoneutralinojs:mainfrom
subhu339:fix/tray-menu-update-helper

Conversation

@subhu339
Copy link
Copy Markdown
Contributor

#173
Added a helper updateTrayMenuItem

Right now, toggling a checkbox in the tray is a pain because you have to manually update the tray object and call setTray every time. This helper does that work for you—just pass the item id and the fields you want to change, and it handles the rest.

Changes:
Finds the menu item by ID and merges the new properties.
Automatically calls setTray to refresh the UI.
Uses Partial types for better autocomplete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant