Interface INavigationBarTab<D, SecondaryData>

interface INavigationBarTab<D, SecondaryData> {
    controlsId?: string;
    creating?: boolean;
    data?: D;
    dirty?: boolean;
    disabled?: boolean;
    excludedFromSystemMenu?: boolean;
    hidden?: boolean;
    hideSecondaryTabs?: boolean;
    icon?: string;
    id: string;
    img?: string;
    isLabelResourceKey?: boolean;
    label: string;
    routeUrl: string;
    secondaryTabs?: ISecondaryNavigationBarTab<SecondaryData>[];
    selectedSecondaryTab?: ISecondaryNavigationBarTab<SecondaryData>;
    sortIndex?: number;
    getSaveOptions?(tab: INavigationBarTab<{
        [key: string]: any;
    }, {
        [key: string]: any;
    }>): undefined | INavigationBarTabSaveOptions;
    onClose?(tab: INavigationBarTab<{
        [key: string]: any;
    }, {
        [key: string]: any;
    }>): boolean | Promise<boolean> | Observable<boolean>;
}

Type Parameters

  • D = {
        [key: string]: any;
    }
  • SecondaryData = D

Properties

controlsId?: string

aria-controls id

creating?: boolean

indicate that the tab is associated with some new object being created.

data?: D

any extra data to be associated with the tab

dirty?: boolean

mark tab as dirty

disabled?: boolean

visually disable and make tab unselectable

excludedFromSystemMenu?: boolean

exclude tab from appearing in the navigation bar system tab menu

hidden?: boolean

visually hide tab and make unselectable

hideSecondaryTabs?: boolean

visually hide secondary tabs bar for a tab

icon?: string

font icon

id: string

unique tab id

img?: string

image url

isLabelResourceKey?: boolean

when true, will use resourceService.get to resolve INavigationBarTab.label

label: string

label for the tab, can be String or the resource.key (if .isLabelResourceKey:true)

routeUrl: string

url relative to shell root e.g. /user/123 - this must start with a /

list of secondary tabs which will be displayed under the top-level tab

keep track of the currently selected secondary tab

sortIndex?: number

a weight used during .sort to order the tabs; will default to the order the tabs came as doesn't mean their array index, as many can be the same, negatives, fractions

Methods

  • callback when tab is removed

    Parameters

    • tab: INavigationBarTab<{
          [key: string]: any;
      }, {
          [key: string]: any;
      }>

    Returns boolean | Promise<boolean> | Observable<boolean>