diff --git a/packages/grid/src/components/context-menu/context-menu.component.html b/packages/grid/src/components/context-menu/context-menu.component.html index 60a87d98..58e7cc16 100644 --- a/packages/grid/src/components/context-menu/context-menu.component.html +++ b/packages/grid/src/components/context-menu/context-menu.component.html @@ -8,7 +8,7 @@ (click)="execute(menu)" [thyDisabled]="disabled" > - + {{ menu.name }} } diff --git a/src/app/component/common/content/content.component.ts b/src/app/component/common/content/content.component.ts index d5481d95..4798e3ed 100644 --- a/src/app/component/common/content/content.component.ts +++ b/src/app/component/common/content/content.component.ts @@ -65,6 +65,7 @@ export class DemoTableContent { aiFieldConfig: Signal = computed(() => { const readonly = this.tableService.readonly(); + const onlyOneField = this.tableService.fields().length === 1; return { fieldRenderers: { [AITableFieldType.date]: { @@ -94,14 +95,14 @@ export class DemoTableContent { hidden: (aiTable: AITable, field: Signal) => false, disabled: (aiTable: AITable, field: Signal) => false }, - { ...DividerMenuItem, hidden: () => readonly }, + { ...DividerMenuItem, hidden: () => readonly || onlyOneField }, { ...buildRemoveFieldItem(() => { const member = 'member_03'; const time = new Date().getTime(); return { updated_at: time, updated_by: member }; }), - hidden: () => readonly + hidden: () => readonly || onlyOneField } ] };