Products

Intrasheets Custom Menu

The menu property lets developers enhance Intrasheets by adding, modifying, or removing menu options to integrate new features. During initialisation, use the menu() method to create custom items and embed specific workflows or utilities directly into the interface.

Customizing the Menu

The menu() function intercepts and customizes default menu options as needed during initialization.

Method Description
menu(object[]) Intercept the top menu options.
intrasheets({
    bar: {
        suggestions: true
    },
    client: {
        url: 'http://localhost:3009',
        auth: {
            token: token,
            invitation: invitation,
        },
        onerror: function(e) {
            jSuites.notification(e);
        },
    },
    menu: function(options) {
        // Default options
    }
})

Menu Item Properties

Configure each item with properties that enhance usability:

Property Description
title: string Text displayed for the menu item, expandable in wide layouts.
submenu: Item[] Array of sub-items creating a dropdown for related features.
icon: string Material icon keyword to visually represent the item.
type: string Defines item type: "line" for separators or "item" for clickable options.
shortcut: string Keyboard shortcut for quick access.
disabled: boolean Disables the item if set to true.
tooltip: string Tooltip text shown on hover, providing additional context.

Event Hooks

Use events to add interactivity and functionality:

Event Description
onclick Executes on click, ideal for feature-specific actions.
render Customizes item display, allowing for dynamic

Top Menu Component

The Intrasheets top menu is built using the LemonadeJS JavaScript Top Menu. Please refer to the documentation for more details.

LemonadeJS Top Menu Component


Examples

Remove the last item

intrasheets({
    bar: {
        suggestions: true
    },
    client: {
        url: 'http://localhost:3009',
        auth: {
            token: token,
            invitation: invitation,
        },
        onerror: function(e) {
            jSuites.notification(e);
        },
    },
    menu: function(options) {
        // Remove the last option
        options.shift();
    }
})