Do not propogate state change unless block name actually changed

This commit is contained in:
Emir Karabeg
2025-01-31 14:58:00 -08:00
parent cdb646e16a
commit 88f25bb0dd

View File

@@ -70,10 +70,11 @@ export function WorkflowBlock({
}
const handleNameSubmit = () => {
if (editedName.trim()) {
updateBlockName(id, editedName.trim())
setIsEditing(false)
const trimmedName = editedName.trim()
if (trimmedName && trimmedName !== name) {
updateBlockName(id, trimmedName)
}
setIsEditing(false)
}
const handleNameKeyDown = (e: React.KeyboardEvent) => {