diff --git a/apps/client/src/menus/context_menu.ts b/apps/client/src/menus/context_menu.ts index aefe7bf30..4411db9dc 100644 --- a/apps/client/src/menus/context_menu.ts +++ b/apps/client/src/menus/context_menu.ts @@ -26,6 +26,11 @@ export interface MenuCommandItem { title: string; command?: T; type?: string; + /** + * The icon to display in the menu item. + * + * If not set, no icon is displayed and the item will appear shifted slightly to the left if there are other items with icons. To avoid this, use `bx bx-empty`. + */ uiIcon?: string; badges?: MenuItemBadge[]; templateNoteId?: string; diff --git a/apps/client/src/widgets/view_widgets/table_view/context_menu.ts b/apps/client/src/widgets/view_widgets/table_view/context_menu.ts index a63ab21ed..53a6364d4 100644 --- a/apps/client/src/widgets/view_widgets/table_view/context_menu.ts +++ b/apps/client/src/widgets/view_widgets/table_view/context_menu.ts @@ -139,11 +139,13 @@ function showHeaderContextMenu(_e: Event, tabulator: Tabulator) { uiIcon: "bx bx-empty", items: buildColumnItems(tabulator) }, + { title: "----" }, { title: t("table_view.new-column"), - uiIcon: "bx bx-columns", - handler: () => getParentComponent(e)?.triggerCommand("addNewTableColumn", {}) + uiIcon: "bx bx-empty", + enabled: false }, + ...buildInsertSubmenu(e) ], selectMenuItemHandler() {}, x: e.pageX, @@ -246,7 +248,7 @@ function buildColumnItems(tabulator: Tabulator) { return items; } -function buildInsertSubmenu(e: MouseEvent, referenceColumn: ColumnComponent, direction: "before" | "after"): MenuItem[] { +function buildInsertSubmenu(e: MouseEvent, referenceColumn?: ColumnComponent, direction?: "before" | "after"): MenuItem[] { return [ { title: t("table_view.new-column-label"), diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Notes/Note List/Table View.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Notes/Note List/Table View.html index 92c9f3e7c..629b15342 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Notes/Note List/Table View.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Notes/Note List/Table View.html @@ -46,7 +46,8 @@
  • Press Add new column at the bottom of the table.
  • Right click on an existing column and select Add column to the left/right.
  • Right click on the empty space of the column header and select New column.
  • + data-list-item-id="e681ba5bf3901016423216783a17f13f8">Right click on the empty space of the column header and select Label or Relation in + the New column section.

    Adding new rows

    Each row is actually a note that is a child of the Collection note.

    diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Note List/Table View.md b/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Note List/Table View.md index d2a59b3ed..9e16684b6 100644 --- a/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Note List/Table View.md +++ b/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Note List/Table View.md @@ -35,7 +35,7 @@ To create a new column, either: * Press _Add new column_ at the bottom of the table. * Right click on an existing column and select Add column to the left/right. -* Right click on the empty space of the column header and select _New column_. +* Right click on the empty space of the column header and select _Label_ or _Relation_ in the _New column_ section. ### Adding new rows