src/lib/shared/interfaces/inbox-tab-bar-item.interface.ts
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,
},
];
Properties |
|
| counter |
counter:
|
Type : BehaviorSubject<number>
|
| Optional |
|
Counter of the tab. Can be changed by the consuming application during runtime. |
| detailViewTabContentTemplate |
detailViewTabContentTemplate:
|
Type : TemplateRef<any>
|
| Optional |
|
TemplateRef of the tab content. |
| icon |
icon:
|
Type : string
|
|
The icon is limited by the talenra-icon library (https://gitlab.svanet.ch/talenra/talenra-workspace). |
| key |
key:
|
Type : string
|
| Optional |
|
Unique key used to identify the item. |
| label |
label:
|
Type : string
|
|
Label of the tab. |
| maxCounter |
maxCounter:
|
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:
|
Type : boolean
|
|
If true, the tab content will be wrapped in a scrollable container. |