types.ui.layout.ITabProps - ZeMA-gGmbH/NoPE-JS GitHub Wiki
A Configuration to define a Tab-Group
Export
ITabProps
layoutId: string
The id of the W2UI-Layout, where the tab-group is getting rendered
Memberof
ITabProps
name: string
Optional onConfigChanged: (config: ITabProps) => void
(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
| Name | Type |
|---|---|
config |
ITabProps |
void
Optional onMount: (item: ITabProps) => void
(item): void
Callback, which will be call during rendering the tab group for the first time.
Memberof
ITabProps
| Name | Type |
|---|---|
item |
ITabProps |
void
Optional onNewTab: () => Promise<false | ITab>
(): 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
Promise<false | ITab>
Optional onNoTabSelected: () => Promise<void>
(): Promise<void>
A callback, which will be called, if all tabs has been closed.
Memberof
ITabProps
Promise<void>
Optional onTabDelete: (tabId: ITab, forced?: boolean) => Promise<boolean>
(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
| Name | Type |
|---|---|
tabId |
ITab |
forced? |
boolean |
Promise<boolean>
Optional onTabEdit: (tab: ITab) => Promise<ITab>
(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
| Name | Type |
|---|---|
tab |
ITab |
Promise<ITab>
Optional onTabSelect: (oldTabId: ITab, newTabId: ITab) => Promise<boolean>
(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
| Name | Type |
|---|---|
oldTabId |
ITab |
newTabId |
ITab |
Promise<boolean>
position: ValidPanels
The position on the W2UI-Layout, where the tab-group is getting rendered
Memberof
ITabProps
Optional reorder: boolean
Flag to allow / disable reordering of the tabs.
Memberof
ITabProps
tabs: Object
Object, containing the inital tabs.
Memberof
ITabProps
| 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. |