Fix id state issue when renaming tasks

This commit is contained in:
Gordon 2021-04-29 20:04:34 +01:00
parent 6e6b87d8db
commit 0589f3dc4d

View File

@ -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',