A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.

Hierarchy

  • LayoutNode
    • TabStack

Properties

type: "stack" = 'stack'

Type of the content item. Always stack, but useful for distinguishing between a TabStack and ColumnOrRow.

Methods

  • Experimental

    Adds or creates a view in this TabStack.

    Known Issue: If adding a view overflows the tab-container, the added view will be set as active and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.

    Returns

    Resolves with the identity of the added view.

    Throws

    If the view does not exist or fails to create.

    Throws

    If the TabStack has been destroyed.

    Tutorial

    TabStack.addView

    Parameters

    • view: Identity | Partial<ViewOptions>

      The identity of an existing view to add, or options to create a view.

    • options: AddViewToStackOptions = ...

      Optional view options: index number used to insert the view into the stack at that index. Defaults to 0 (front of the stack)

    Returns Promise<Identity>

  • Returns Promise<boolean>

  • Experimental

    Retrieves a list of all views belonging to this TabStack.

    Known Issue: If adding a view overflows the tab-container width, the added view will be set as active and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged. If that happens and then getViews() is called, it will return the identities in a different order than than the currently rendered tab order.

    Returns

    Resolves with a list containing the identities of each view belonging to the TabStack.

    Throws

    If the TabStack has been destroyed.

    Tutorial

    TabStack.getViews

    Returns Promise<Identity[]>

  • Returns Promise<boolean>

  • Removes a view from this TabStack.

    Throws

    If the view does not exist or does not belong to the stack.

    Throws

    If the TabStack has been destroyed.

    Returns

    Tutorial

    TabStack.removeView

    Parameters

    • view: Identity

      Identity of the view to remove.

    Returns Promise<void>

  • Experimental

    Sets the active view of the TabStack without focusing it.

    Returns

    Promise which resolves with void once the view has been activated.

    Throws

    If the TabStack has been destroyed.

    Throws

    If the view does not exist.

    Tutorial

    TabStack.setActiveView

    Parameters

    • view: Identity

      Identity of the view to activate.

    Returns Promise<void>

Generated using TypeDoc