🐛 (editor) Shouldn't be able to set a group name to empty string
This commit is contained in:
@@ -99,7 +99,7 @@ const DraggableGroupNode = memo(
|
|||||||
}, [connectingIds, group.id])
|
}, [connectingIds, group.id])
|
||||||
|
|
||||||
const handleTitleSubmit = (title: string) =>
|
const handleTitleSubmit = (title: string) =>
|
||||||
updateGroup(groupIndex, { title })
|
title.length > 0 ? updateGroup(groupIndex, { title }) : undefined
|
||||||
|
|
||||||
const handleMouseDown = (e: React.MouseEvent) => {
|
const handleMouseDown = (e: React.MouseEvent) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
@@ -187,6 +187,7 @@ const DraggableGroupNode = memo(
|
|||||||
onSubmit={handleTitleSubmit}
|
onSubmit={handleTitleSubmit}
|
||||||
fontWeight="semibold"
|
fontWeight="semibold"
|
||||||
pointerEvents={isReadOnly || isStartGroup ? 'none' : 'auto'}
|
pointerEvents={isReadOnly || isStartGroup ? 'none' : 'auto'}
|
||||||
|
pr="8"
|
||||||
>
|
>
|
||||||
<EditablePreview
|
<EditablePreview
|
||||||
_hover={{ bgColor: 'gray.200' }}
|
_hover={{ bgColor: 'gray.200' }}
|
||||||
|
|||||||
Reference in New Issue
Block a user