updated 'addDynamicColumns' method to be private
This commit is contained in:
parent
2a2e028b44
commit
a4ae61fcac
@ -254,24 +254,14 @@ export class DossierOverviewScreenComponent extends ListingComponent<FileStatusW
|
|||||||
this.collapsedDetails = !this.collapsedDetails;
|
this.collapsedDetails = !this.collapsedDetails;
|
||||||
}
|
}
|
||||||
|
|
||||||
addDynamicColumns() {
|
|
||||||
const dynamicColumns: TableColumnConfig<FileStatusWrapper>[] = [];
|
|
||||||
for (const config of this.displayedInFileListAttributes) {
|
|
||||||
if (config.displayedInFileList) {
|
|
||||||
dynamicColumns.push({ label: config.label, notTranslatable: true });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.tableColumnConfigs = [this.tableColumnConfigs[0], ...dynamicColumns, ...this.tableColumnConfigs.slice(1)];
|
|
||||||
this.dynamicColumnsCount = dynamicColumns.length;
|
|
||||||
this.updateGridColumns();
|
|
||||||
}
|
|
||||||
|
|
||||||
updateGridColumns($event = null) {
|
updateGridColumns($event = null) {
|
||||||
const element = this._elementRef.nativeElement.querySelector('.cdk-virtual-scroll-content-wrapper');
|
if (this.dynamicColumnsCount) {
|
||||||
const gridTemplateColumns = `auto 3fr repeat(${this.dynamicColumnsCount}, 1fr) 2fr 1fr 2fr 1fr auto ${
|
const element = this._elementRef.nativeElement.querySelector('.cdk-virtual-scroll-content-wrapper');
|
||||||
$event?.type === 'mouseenter' ? '' : '11px'
|
const gridTemplateColumns = `auto 3fr repeat(${this.dynamicColumnsCount}, 1fr) 2fr 1fr 2fr 1fr auto ${
|
||||||
}`;
|
$event?.type === 'mouseenter' ? '' : '11px'
|
||||||
this._renderer.setStyle(element, 'grid-template-columns', gridTemplateColumns);
|
}`;
|
||||||
|
this._renderer.setStyle(element, 'grid-template-columns', gridTemplateColumns);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get displayedInFileListAttributes() {
|
get displayedInFileListAttributes() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user