Skip to content

Commit 85301e0

Browse files
fix(module:list): static query list-item-action template (#8527)
1 parent c1e39e7 commit 85301e0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

components/list/list-item-cell.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
TemplateRef,
1717
ViewChild
1818
} from '@angular/core';
19-
import { defer, merge, Observable, of, Subject } from 'rxjs';
19+
import { Observable, Subject, defer, merge, of } from 'rxjs';
2020
import { mergeMap, startWith, takeUntil } from 'rxjs/operators';
2121

2222
import { NzDestroyService } from 'ng-zorro-antd/core/services';
@@ -26,7 +26,7 @@ import { NzSafeAny } from 'ng-zorro-antd/core/types';
2626
selector: 'nz-list-item-extra, [nz-list-item-extra]',
2727
exportAs: 'nzListItemExtra',
2828
changeDetection: ChangeDetectionStrategy.OnPush,
29-
template: ` <ng-content></ng-content> `,
29+
template: `<ng-content></ng-content>`,
3030
host: {
3131
class: 'ant-list-item-extra'
3232
},
@@ -38,11 +38,11 @@ export class NzListItemExtraComponent {}
3838
selector: 'nz-list-item-action',
3939
exportAs: 'nzListItemAction',
4040
changeDetection: ChangeDetectionStrategy.OnPush,
41-
template: ` <ng-template><ng-content></ng-content></ng-template> `,
41+
template: `<ng-template><ng-content></ng-content></ng-template>`,
4242
standalone: true
4343
})
4444
export class NzListItemActionComponent {
45-
@ViewChild(TemplateRef) templateRef?: TemplateRef<void>;
45+
@ViewChild(TemplateRef, { static: true }) templateRef?: TemplateRef<void>;
4646
}
4747

4848
@Component({

0 commit comments

Comments
 (0)