Skip to content

Commit

Permalink
fix(abc:st): fix optional use context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Jul 1, 2024
1 parent b9b36d6 commit 90f40fd
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 90f40fd

Please sign in to comment.