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;
|
||||
}
|
||||
|
||||
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) {
|
||||
const element = this._elementRef.nativeElement.querySelector('.cdk-virtual-scroll-content-wrapper');
|
||||
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);
|
||||
if (this.dynamicColumnsCount) {
|
||||
const element = this._elementRef.nativeElement.querySelector('.cdk-virtual-scroll-content-wrapper');
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
get displayedInFileListAttributes() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user