Skip to content

Commit d581cd6

Browse files
authored
Merge pull request #23913 from abpframework/auto-merge/rel-9-3/4030
Merge branch rel-10.0 with rel-9.3
2 parents a80ce34 + 73b5a7a commit d581cd6

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

npm/ng-packs/packages/components/extensible/src/lib/components/extensible-table/extensible-table.component.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
@if (actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)) {
4747
<ngx-datatable-column
4848
[name]="actionsText | abpLocalization"
49-
[maxWidth]="columnWidths[0] ?? undefined"
50-
[width]="columnWidths[0] ?? 200"
51-
[canAutoResize]="!columnWidths[0]"
49+
[maxWidth]="_actionsColumnWidth() ?? undefined"
50+
[width]="_actionsColumnWidth() ?? 200"
51+
[canAutoResize]="!_actionsColumnWidth()"
5252
[sortable]="false"
5353
>
5454
<ng-template let-row="row" let-i="rowIndex" ngx-datatable-cell-template>
@@ -66,8 +66,8 @@
6666
@for (prop of propList; track prop.name; let i = $index) {
6767
<ngx-datatable-column
6868
*abpVisible="prop.columnVisible(getInjected)"
69-
[width]="columnWidths[i + 1] ?? 200"
70-
[canAutoResize]="!columnWidths[i + 1]"
69+
[width]="columnWidths[i] ?? 200"
70+
[canAutoResize]="!columnWidths[i]"
7171
[name]="(prop.isExtra ? '::' + prop.displayName : prop.displayName) | abpLocalization"
7272
[prop]="prop.name"
7373
[sortable]="prop.sortable"

npm/ng-packs/packages/components/extensible/src/lib/components/extensible-table/extensible-table.component.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,7 @@ export class ExtensibleTableComponent<R = any> implements OnChanges, AfterViewIn
145145
.subscribe(() => this.triggerLoadMore());
146146

147147
readonly columnWidths = computed(() => {
148-
const actionsColumn = this._actionsColumnWidth();
149-
const widths = [actionsColumn];
150-
this.propList.forEach(({ value: prop }) => {
151-
widths.push(prop.columnWidth);
152-
});
153-
return widths;
148+
return this.propList.toArray().map(prop => prop.columnWidth);
154149
});
155150

156151
constructor() {

0 commit comments

Comments
 (0)