Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'on_mount' option to menu #380

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Add 'on_mount' option to menu #380

wants to merge 4 commits into from

Conversation

cjodo
Copy link

@cjodo cjodo commented Jul 15, 2024

Changes:

  • Added the on_mount option to the menu module.
  • Updated the relevant documentation to include the new option.

Usage:
Users can now pass an on_mount function when creating a menu to execute custom code when the menu is mounted. Example usage:

local Menu = require('nui.menu')

local menu = Menu({
    ...
    on_mount = function()
        print("Menu mounted!")
    end,
    -- other menu options
})

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