2
0

🐛 (editor) Shouldn't be able to set a group name to empty string

This commit is contained in:
Baptiste Arnaud
2022-09-19 07:32:27 +02:00
parent 45409a860f
commit 6a1eaea700

View File

@ -99,7 +99,7 @@ const DraggableGroupNode = memo(
}, [connectingIds, group.id])
const handleTitleSubmit = (title: string) =>
updateGroup(groupIndex, { title })
title.length > 0 ? updateGroup(groupIndex, { title }) : undefined
const handleMouseDown = (e: React.MouseEvent) => {
e.stopPropagation()
@ -187,6 +187,7 @@ const DraggableGroupNode = memo(
onSubmit={handleTitleSubmit}
fontWeight="semibold"
pointerEvents={isReadOnly || isStartGroup ? 'none' : 'auto'}
pr="8"
>
<EditablePreview
_hover={{ bgColor: 'gray.200' }}