Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Renderer

The default implementation of IRenderer.

Notes

Subclasses are free to reimplement rendering methods as needed.

Hierarchy

  • Renderer

Implements

Index

Constructors

constructor

Properties

Private _tabID

_tabID: number = 0

Private _tabKeys

_tabKeys: WeakMap<Title<any>, string> = new WeakMap<Title<any>, string>()

closeIconSelector

closeIconSelector: ".p-TabBar-tabCloseIcon" = ".p-TabBar-tabCloseIcon"

A selector which matches the close icon node in a tab.

Methods

createIconClass

  • Create the class name for the tab icon.

    Parameters

    Returns string

    The full class name for the tab icon.

createTabClass

  • Create the class name for the tab.

    Parameters

    Returns string

    The full class name for the tab.

createTabDataset

  • createTabDataset(data: IRenderData<any>): ElementDataset
  • Create the dataset for a tab.

    Parameters

    Returns ElementDataset

    The dataset for the tab.

createTabKey

  • Create a unique render key for the tab.

    Parameters

    Returns string

    The unique render key for the tab.

    Notes

    This method caches the key against the tab title the first time the key is generated. This enables efficient rendering of moved tabs and avoids subtle hover style artifacts.

createTabStyle

  • createTabStyle(data: IRenderData<any>): ElementInlineStyle
  • Create the inline style object for a tab.

    Parameters

    Returns ElementInlineStyle

    The inline style data for the tab.

renderCloseIcon

  • renderCloseIcon(data: IRenderData<any>): VirtualElement
  • Render the close icon element for a tab.

    Parameters

    • data: IRenderData<any>

      The data to use for rendering the tab.

    Returns VirtualElement

    A virtual element representing the tab close icon.

renderIcon

  • Render the icon element for a tab.

    Parameters

    • data: IRenderData<any>

      The data to use for rendering the tab.

    Returns VirtualElement

    A virtual element representing the tab icon.

renderLabel

  • Render the label element for a tab.

    Parameters

    • data: IRenderData<any>

      The data to use for rendering the tab.

    Returns VirtualElement

    A virtual element representing the tab label.

renderTab

  • Render the virtual element for a tab.

    Parameters

    • data: IRenderData<any>

      The data to use for rendering the tab.

    Returns VirtualElement

    A virtual element representing the tab.

Generated using TypeDoc