Skip to content

Commit

Permalink
šŸ› fix: Refactor CreateGroupModal component to prevent event propagatiā€¦
Browse files Browse the repository at this point in the history
ā€¦on (#1058)
  • Loading branch information
Justin3go authored Jan 16, 2024
1 parent 448c393 commit fc254e5
Showing 1 changed file with 19 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,25 @@ const CreateGroupModal = memo<CreateGroupModalProps>(
);

return (
<Modal
allowFullscreen
cancelText={t('cancel')}
okText={t('ok')}
onCancel={onCancel}
onOk={handleSubmit}
open={open}
title={t('group.createGroup')}
width={400}
>
<Input
autoFocus
onChange={(e) => setInput(e.target.value)}
placeholder={t('group.inputPlaceholder')}
value={input}
/>
</Modal>
<div onClick={(e) => e.stopPropagation()}>
<Modal
allowFullscreen
cancelText={t('cancel')}
okText={t('ok')}
onCancel={onCancel}
onOk={handleSubmit}
open={open}
title={t('group.createGroup')}
width={400}
>
<Input
autoFocus
onChange={(e) => setInput(e.target.value)}
placeholder={t('group.inputPlaceholder')}
value={input}
/>
</Modal>
</div>
);
},
);
Expand Down

0 comments on commit fc254e5

Please sign in to comment.