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 5bfc51b8e..ca0adc2f0 100644 --- a/apps/client/src/widgets/view_widgets/table_view/columns.ts +++ b/apps/client/src/widgets/view_widgets/table_view/columns.ts @@ -51,7 +51,7 @@ export function buildColumnDefinitions(info: AttributeDefinitionInformation[], m resizable: false, frozen: true, rowHandle: movableRows, - formatter: RowNumberFormatter + formatter: RowNumberFormatter(movableRows) }, { field: "noteId", 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 136539652..15701bc5c 100644 --- a/apps/client/src/widgets/view_widgets/table_view/formatters.ts +++ b/apps/client/src/widgets/view_widgets/table_view/formatters.ts @@ -36,13 +36,15 @@ export function NoteTitleFormatter(cell: CellComponent) { return $noteRef[0].outerHTML; } -export function RowNumberFormatter(cell: CellComponent) { - let html = ""; - if (cell.getColumn().getDefinition().rowHandle) { - html += ` `; - } - html += cell.getRow().getPosition(true); - return html; +export function RowNumberFormatter(draggableRows: boolean) { + return (cell: CellComponent) => { + let html = ""; + if (draggableRows) { + html += ` `; + } + html += cell.getRow().getPosition(true); + return html; + }; } function buildNoteLink(noteId: string) {