fix: prevent empty list title from being saved
This commit is contained in:
parent
c347c6bdc3
commit
61e9249c98
@ -56,7 +56,11 @@ const List = React.forwardRef(
|
|||||||
};
|
};
|
||||||
const onBlur = () => {
|
const onBlur = () => {
|
||||||
setEditingTitle(false);
|
setEditingTitle(false);
|
||||||
onSaveName(listName);
|
if (listName.trim() === '') {
|
||||||
|
setListName(name);
|
||||||
|
} else {
|
||||||
|
onSaveName(listName);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const onEscape = () => {
|
const onEscape = () => {
|
||||||
if ($listNameRef && $listNameRef.current) {
|
if ($listNameRef && $listNameRef.current) {
|
||||||
|
Loading…
Reference in New Issue
Block a user