@dxos/app-toolkit - v0.16.0
    Preparing search index...

    Function useObjectMenuItems

    • Returns object-scoped menu items (Open, Add to collection) for the given subject. Only includes items when subject is an Echo object of a user-facing type. Register them with the card's menu through useMenuContribution(menu, …), where menu is the MenuActions the card owner hands down. A card lives inside a plank, so opening its object always adds a plank beside that plank (add), never replacing it. The menu renders in a portal, so it cannot resolve the plank from its own DOM: the caller supplies the plank's attendable id as pivot — via useCardPivot when the card knows only its own element.

      Parameters

      • subject: unknown
      • Optionalpivot: string

      Returns MenuItem[]