fix: card composer no longer allows creates tasks with empty names
This commit is contained in:
parent
533b9511c9
commit
40b27aa1f1
@ -38,8 +38,10 @@ const CardComposer = ({ isOpen, onCreateCard, onClose }: Props) => {
|
|||||||
taskGroupID=""
|
taskGroupID=""
|
||||||
editable
|
editable
|
||||||
onEditCard={(_taskGroupID, _taskID, name) => {
|
onEditCard={(_taskGroupID, _taskID, name) => {
|
||||||
onCreateCard(name);
|
if (cardName.trim() !== '') {
|
||||||
|
onCreateCard(name.trim());
|
||||||
setCardName('');
|
setCardName('');
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
onCardTitleChange={name => {
|
onCardTitleChange={name => {
|
||||||
setCardName(name);
|
setCardName(name);
|
||||||
@ -50,8 +52,10 @@ const CardComposer = ({ isOpen, onCreateCard, onClose }: Props) => {
|
|||||||
<AddCardButton
|
<AddCardButton
|
||||||
variant="relief"
|
variant="relief"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onCreateCard(cardName);
|
if (cardName.trim() !== '') {
|
||||||
|
onCreateCard(cardName.trim());
|
||||||
setCardName('');
|
setCardName('');
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Add Card
|
Add Card
|
||||||
|
Loading…
Reference in New Issue
Block a user