Interface ITabProps

A Configuration to define a Tab-Group

Export

ITabProps

Hierarchy

  • ITabProps

Properties

layoutId: string

The id of the W2UI-Layout, where the tab-group is getting rendered

Memberof

ITabProps

name: string
onConfigChanged?: ((config) => void)

Type declaration

    • (config): void
    • Callback, which is called if the Configuration has been changed. This is the case, if a tab as been added, selected or removed

      Memberof

      ITabProps

      Parameters

      Returns void

onMount?: ((item) => void)

Type declaration

    • (item): void
    • Callback, which will be call during rendering the tab group for the first time.

      Memberof

      ITabProps

      Parameters

      Returns void

onNewTab?: (() => Promise<false | ITab>)

Type declaration

    • (): Promise<false | ITab>
    • Callback, which will be called if a new tab is created. If creating is permitted, the promise must resolve false, otherwise a tab-defintion (see ITab) must be resolved.

      Memberof

      ITabProps

      Returns Promise<false | ITab>

onNoTabSelected?: (() => Promise<void>)

Type declaration

    • (): Promise<void>
    • A callback, which will be called, if all tabs has been closed.

      Memberof

      ITabProps

      Returns Promise<void>

onTabDelete?: ((tabId, forced?) => Promise<boolean>)

Type declaration

    • (tabId, forced?): Promise<boolean>
    • Callback, which is call if the user wants to change the tab. The callback must resolve a boolean, where as true allows the deleting the tab, false permits deleting the tab.

      Memberof

      ITabProps

      Parameters

      • tabId: ITab
      • Optional forced: boolean

      Returns Promise<boolean>

onTabEdit?: ((tab) => Promise<ITab>)

Type declaration

    • (tab): Promise<ITab>
    • Callback, which is called, if the Tab receivs a double-click. The function can adapt the Tab configuration (for example its label) which must be returned by this label.

      Memberof

      ITabProps

      Parameters

      Returns Promise<ITab>

onTabSelect?: ((oldTabId, newTabId) => Promise<boolean>)

Type declaration

    • (oldTabId, newTabId): Promise<boolean>
    • Callback, which is call if the user wants to change the tab. The callback must resolve a boolean, where as true allows the tab-change, false permits the change.

      Memberof

      ITabProps

      Parameters

      Returns Promise<boolean>

The position on the W2UI-Layout, where the tab-group is getting rendered

Memberof

ITabProps

reorder?: boolean

Flag to allow / disable reordering of the tabs.

Memberof

ITabProps

tabs: {
    active: string;
    allowNewTabs?: boolean;
    items: ITab[];
}

Object, containing the inital tabs.

Memberof

ITabProps

Type declaration

  • active: string

    Flag of the active tab.

  • Optional allowNewTabs?: boolean

    Flag, which will ensure that there exits a tab with the label +. If clicked, a new tab will be inserted. This results in the calling the onNewTab callback.

  • items: ITab[]

    List of the available tabs.

Generated using TypeDoc