From ba5ef93c1acd9aa33a2426608182f05165cb087a Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 18 Jul 2025 21:07:16 +0300 Subject: [PATCH] fix(views/table): wrong type when renaming relations --- .../src/widgets/view_widgets/table_view/col_editing.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/client/src/widgets/view_widgets/table_view/col_editing.ts b/apps/client/src/widgets/view_widgets/table_view/col_editing.ts index 48a39d031..ac8c7e740 100644 --- a/apps/client/src/widgets/view_widgets/table_view/col_editing.ts +++ b/apps/client/src/widgets/view_widgets/table_view/col_editing.ts @@ -78,14 +78,14 @@ export default class TableColumnEditing extends Component { return; } - const { name, type, value } = this.newAttribute; + const { name, value } = this.newAttribute; this.api.blockRedraw(); try { if (this.existingAttributeToEdit && this.existingAttributeToEdit.name !== name) { const oldName = this.existingAttributeToEdit.name.split(":")[1]; - const newName = name.split(":")[1]; - await renameColumn(this.parentNote.noteId, type, oldName, newName); + const [ type, newName ] = name.split(":"); + await renameColumn(this.parentNote.noteId, type as "label" | "relation", oldName, newName); } attributes.setLabel(this.parentNote.noteId, name, value);