File

src/lib/shared/interfaces/inbox-tab-bar-item.interface.ts

Description

Interface to input the dynamic content and settings for the detail view tabs.

Example :
import { IInboxTabBarItem } from '@talenra/inbox';

@ViewChild('talenraInboxDocuments', { read: TemplateRef }) talenraInboxDocuments!: TemplateRef<any>;
@ViewChild('talenraInboxComments', { read: TemplateRef }) talenraInboxComments!: TemplateRef<any>;
@ViewChild('talenraInboxHistory', { read: TemplateRef }) talenraInboxHistory!: TemplateRef<any>;

specificInboxTabBarItems: IInboxTabBarItem[] = [
  {
    label: 'documents',
    icon: 'description',
    counter: new BehaviorSubject<number>(8),
    useScroll: false,
    detailViewTabContentTemplate: this.talenraInboxDocuments,
  },
  {
    label: 'comments',
    icon: 'chat-bubble-outline',
    counter: new BehaviorSubject<number>(100),
    maxCounter: 50,
    useScroll: true,
    detailViewTabContentTemplate: this.talenraInboxComments,
  },
  {
    label: 'history',
    icon: 'history',
    useScroll: false,
    detailViewTabContentTemplate: this.talenraInboxHistory,
  },
];

Index

Properties

Properties

counter
counter: BehaviorSubject<number>
Type : BehaviorSubject<number>
Optional

Counter of the tab. Can be changed by the consuming application during runtime.

detailViewTabContentTemplate
detailViewTabContentTemplate: TemplateRef<any>
Type : TemplateRef<any>
Optional

TemplateRef of the tab content.

icon
icon: string
Type : string

The icon is limited by the talenra-icon library (https://gitlab.svanet.ch/talenra/talenra-workspace).

key
key: string
Type : string
Optional

Unique key used to identify the item.

label
label: string
Type : string

Label of the tab.

maxCounter
maxCounter: number
Type : number
Optional

Maximum value of the counter. If the counter exceeds this value, it will be displayed as 'maxCounter+'. Default is 99.

useScroll
useScroll: boolean
Type : boolean

If true, the tab content will be wrapped in a scrollable container.

results matching ""

    No results matching ""