From 0589f3dc4d8a14fa339754cd7c7b4bf1d77825fa Mon Sep 17 00:00:00 2001 From: Gordon Date: Thu, 29 Apr 2021 20:04:34 +0100 Subject: [PATCH] Fix id state issue when renaming tasks --- src/TaskEditor.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/TaskEditor.tsx b/src/TaskEditor.tsx index 74c3b3e..12e364c 100644 --- a/src/TaskEditor.tsx +++ b/src/TaskEditor.tsx @@ -57,13 +57,17 @@ const TaskEditor = ({ task, tasks, columnName, columnNames, dateFormat, panelUui // Called when the name field is changed const handleUpdateName = ({ target: { value } }, values) => { + const id = paramCase(value); // Update the id preview setTaskData({ ...taskData, - id: paramCase(value) + id }); + // Update values + values.id = id; + // Update the webview panel title vscode.postMessage({ command: 'kanbn.updatePanelTitle',