SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Function useContributeCommands

    • Contribute a set of command definitions onto the current (ambient) scope for the lifetime of the calling component, removing them on unmount. The generic "drop a contributor" primitive (the model→scope adapter, design/COMMAND-DESIGN.md): a feature builds its definitions — chrome + callbacks bound to its live model — and hands them here; the placement rule decides which scope is ambient (e.g. a grid pane scope provided by wrapPane).

      Parameters

      • definitions: readonly ICommandDefinition<any, any, void>[]

        The (callback-bearing) definitions to contribute. Memoize by the model.

      Returns void

      Decoupled from any visual layer: a contributor is a sibling that writes to the shared scope, not a wrapper. Pass a stable definitions reference (memoize on the model) — a fresh array each render re-contributes. No-ops when there is no ambient scope (graceful when the grid isn't running commands).