Skip to content

Commit

Permalink
fix(abc:st): fix optional use context menu (#1804)
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk authored Jul 1, 2024
1 parent 36ee49b commit bcf9721
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/abc/st/st.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class STComponent implements AfterViewInit, OnChanges {
private readonly columnSource = inject(STColumnSource);
private readonly dataSource = inject(STDataSource);
private readonly delonI18n = inject(DelonLocaleService);
private readonly cms = inject(NzContextMenuService);
private readonly cms = inject(NzContextMenuService, { optional: true });
private readonly destroy$ = inject(DestroyRef);

private totalTpl = ``;
Expand Down Expand Up @@ -798,7 +798,7 @@ export class STComponent implements AfterViewInit, OnChanges {
return i;
});
this.cdr.detectChanges();
this.cms.create(event, this.contextmenuTpl);
this.cms?.create(event, this.contextmenuTpl);
});
}
// #endregion
Expand Down

0 comments on commit bcf9721

Please sign in to comment.