diff --git a/apps/client/src/widgets/view_widgets/table_view/columns.ts b/apps/client/src/widgets/view_widgets/table_view/columns.ts index 8c0589928..bae64bda3 100644 --- a/apps/client/src/widgets/view_widgets/table_view/columns.ts +++ b/apps/client/src/widgets/view_widgets/table_view/columns.ts @@ -1,5 +1,5 @@ import { RelationEditor } from "./relation_editor.js"; -import { NoteFormatter, NoteTitleFormatter } from "./formatters.js"; +import { NoteFormatter, NoteTitleFormatter, RowNumberFormatter } from "./formatters.js"; import { applyHeaderMenu } from "./header-menu.js"; import type { ColumnDefinition } from "tabulator-tables"; import { LabelType } from "../../../services/promoted_attribute_definition_parser.js"; @@ -46,11 +46,12 @@ export function buildColumnDefinitions(info: PromotedAttributeInformation[], exi const columnDefs: ColumnDefinition[] = [ { title: "#", - formatter: "rownum", headerSort: false, hozAlign: "center", resizable: false, - frozen: true + frozen: true, + rowHandle: true, + formatter: RowNumberFormatter }, { field: "noteId", @@ -79,6 +80,7 @@ export function buildColumnDefinitions(info: PromotedAttributeInformation[], exi field, title: title ?? name, editor: "input", + rowHandle: false, ...labelTypeMappings[type ?? "text"], }); seenFields.add(field); diff --git a/apps/client/src/widgets/view_widgets/table_view/formatters.ts b/apps/client/src/widgets/view_widgets/table_view/formatters.ts index 68e529798..1994ab236 100644 --- a/apps/client/src/widgets/view_widgets/table_view/formatters.ts +++ b/apps/client/src/widgets/view_widgets/table_view/formatters.ts @@ -36,6 +36,10 @@ export function NoteTitleFormatter(cell: CellComponent) { return $noteRef[0].outerHTML; } +export function RowNumberFormatter(cell: CellComponent) { + return ` ` + cell.getRow().getPosition(true); +} + function buildNoteLink(noteId: string) { const $noteRef = $(""); const href = `#root/${noteId}`;