Skip to content

Commit

Permalink
fix: not call onCancel function when updating connection
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsweet committed Sep 29, 2024
1 parent 8bf8f8e commit 11d7f94
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ interface Props {
}

export const ConnectionFormModal = ({ plugin, connectionId, open, onCancel, onSuccess }: Props) => {
const handleSuccess = (id: ID) => {
onSuccess?.(id);
onCancel();
};

return (
<Modal
open={open}
Expand All @@ -45,7 +50,7 @@ export const ConnectionFormModal = ({ plugin, connectionId, open, onCancel, onSu
footer={null}
onCancel={() => onCancel()}
>
<ConnectionForm plugin={plugin} connectionId={connectionId} onSuccess={onSuccess} />
<ConnectionForm plugin={plugin} connectionId={connectionId} onSuccess={handleSuccess} />
</Modal>
);
};

0 comments on commit 11d7f94

Please sign in to comment.