Skip to content

Open-source and local-first Slack and Notion alternative that puts you in control of your data

Fix record name update

Hakan Shehu8d43bf673a1d
diff --git a/apps/desktop/src/renderer/components/databases/tables/table-view-name-cell.tsx b/apps/desktop/src/renderer/components/databases/tables/table-view-name-cell.tsx
index 77e52ef4..ae614977 100644
--- a/apps/desktop/src/renderer/components/databases/tables/table-view-name-cell.tsx
+++ b/apps/desktop/src/renderer/components/databases/tables/table-view-name-cell.tsx
@@ -63,10 +63,9 @@ export const TableViewNameCell = ({ record }: TableViewNameCellProps) => {
const handleSave = (newName: string) => {
mutate({
input: {
- type: 'view_name_update',
- databaseId: record.attributes.databaseId,
- viewId: record.id,
+ type: 'record_name_update',
name: newName,
+ recordId: record.id,
userId: workspace.userId,
},
onSuccess() {
@@ -74,7 +73,7 @@ export const TableViewNameCell = ({ record }: TableViewNameCellProps) => {
},
onError(error) {
toast({
- title: 'Failed to update view',
+ title: 'Failed to update record',
description: error.message,
variant: 'destructive',
});