types.ui.layout.ITabProps - ZeMA-gGmbH/NoPE-JS GitHub Wiki

Interface: ITabProps

ui.layout.ITabProps

A Configuration to define a Tab-Group

Export

ITabProps

Properties

layoutId

layoutId: string

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

Memberof

ITabProps


name

name: string


onConfigChanged

Optional onConfigChanged: (config: ITabProps) => 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
Name Type
config ITabProps
Returns

void


onMount

Optional onMount: (item: ITabProps) => void

Type declaration

(item): void

Callback, which will be call during rendering the tab group for the first time.

Memberof

ITabProps

Parameters
Name Type
item ITabProps
Returns

void


onNewTab

Optional 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

Optional 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

Optional onTabDelete: (tabId: ITab, forced?: boolean) => 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
Name Type
tabId ITab
forced? boolean
Returns

Promise<boolean>


onTabEdit

Optional onTabEdit: (tab: ITab) => 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
Name Type
tab ITab
Returns

Promise<ITab>


onTabSelect

Optional onTabSelect: (oldTabId: ITab, newTabId: ITab) => 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
Name Type
oldTabId ITab
newTabId ITab
Returns

Promise<boolean>


position

position: ValidPanels

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

Memberof

ITabProps


reorder

Optional reorder: boolean

Flag to allow / disable reordering of the tabs.

Memberof

ITabProps


tabs

tabs: Object

Object, containing the inital tabs.

Memberof

ITabProps

Type declaration

Name Type Description
active string Flag of the active tab.
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.
⚠️ **GitHub.com Fallback** ⚠️