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

    Function useCommandElement

    • Name a scope's element — the primitive CommandScopeProvider is built on, for a component that already owns both. Bounds the scope's region (CommandScope.attachBounds) so its commands only dispatch for keystrokes born inside the element; region additionally records it in the tree's region index as a focus leaf (true ⇒ the scope is the anchor, an AnchorSource ⇒ a live leaf).

      Prefer the provider — <CommandScopeProvider scope={…} elementRef={…}> — which also puts the scope in context for the subtree; reach for the hook when the element and the scope are already in hand and there is nothing to wrap.

      Re-attaches when scope, elementRef or region changes and detaches on unmount. A null scope is a no-op, so a chromeless host degrades quietly.

      Parameters

      Returns void