fix(frontend): race condition in label create dialog
This commit is contained in:
parent
18072b615b
commit
5cfa8748d5
|
|
@ -130,7 +130,9 @@ const LabelCreateDialog: React.FC<LabelCreateDialogProps> = ({
|
|||
background_color: formData.background_color || undefined,
|
||||
icon: formData.icon || undefined,
|
||||
});
|
||||
handleClose();
|
||||
// Call onClose directly after successful submission
|
||||
// Don't use handleClose() here to avoid race conditions with loading state
|
||||
onClose();
|
||||
} catch (error) {
|
||||
console.error('Failed to save label:', error);
|
||||
// Could add error handling UI here
|
||||
|
|
|
|||
Loading…
Reference in New Issue