Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(abc:st): fix optional use context menu #1804

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading