}
];
}
+
+ const tableHeadersSubscription = this._tableHeaders
+ .pipe(
+ map((values: CdTableColumn[]) =>
+ values.map(
+ (col: CdTableColumn) =>
+ new TableHeaderItem({
+ data: col?.headerTemplate ? { ...col } : col.name,
+ title: col.name,
+ template: col?.headerTemplate,
+ // if cellClass is a function it cannot be called here as it requires table data to execute
+ // instead if cellClass is a function it will be called and applied while parsing the data
+ className: _.isString(col?.cellClass) ? col?.cellClass : col?.className,
+ visible: !col.isHidden,
+ sortable: _.isNil(col.sortable) ? true : col.sortable
+ })
+ )
+ )
+ )
+ .subscribe({
+ next: (values: TableHeaderItem[]) => (this.model.header = values)
+ });
+
const datasetSubscription = this._dataset
.pipe(
filter((values: any[]) => {
}
});
- const tableHeadersSubscription = this._tableHeaders
- .pipe(
- map((values: CdTableColumn[]) =>
- values.map(
- (col: CdTableColumn) =>
- new TableHeaderItem({
- data: col?.headerTemplate ? { ...col } : col.name,
- title: col.name,
- template: col?.headerTemplate,
- // if cellClass is a function it cannot be called here as it requires table data to execute
- // instead if cellClass is a function it will be called and applied while parsing the data
- className: _.isString(col?.cellClass) ? col?.cellClass : col?.className,
- visible: !col.isHidden,
- sortable: _.isNil(col.sortable) ? true : col.sortable
- })
- )
- )
- )
- .subscribe({
- next: (values: TableHeaderItem[]) => (this.model.header = values)
- });
-
const rowsExpandedSubscription = this.model.rowsExpandedChange.subscribe({
next: (index: number) => {
if (this.model.rowsExpanded.every((x) => !x)) {
}
});
+ this._subscriptions.add(tableHeadersSubscription);
this._subscriptions.add(datasetSubscription);
this._subscriptions.add(rowsExpandedSubscription);
- this._subscriptions.add(tableHeadersSubscription);
}
ngOnInit() {
focus-inverse: lighten(vv.$primary, 25%),
text-inverse: vv.$dark,
support-info: vv.$info,
- layer-01: vv.$secondary,
- layer-hover-01: vv.$gray-600,
+ layer-01: vv.$light,
+ layer-hover-01: colors.$gray-20,
text-primary: vv.$dark,
- text-secondary: vv.$body-bg-alt,
+ text-secondary: vv.$dark,
text-disabled: vv.$gray-500,
icon-secondary: vv.$body-bg-alt
)