Skip to content

Commit

Permalink
fix :: backspace로 학생 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
dutexion committed May 2, 2024
1 parent c04a0e9 commit 25b534f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/Team/Create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const TeamCreate = () => {
};

const onKeydownBackspace = (e: React.KeyboardEvent<HTMLInputElement>) => {
if (selectedStudent && e.code === 'Backspace') {
if (selectedStudent && e.code === 'Backspace' && studentAddition.length === 0) {
onDelete(selectedStudent.length - 1);
addInputRef.current?.focus();
}
Expand Down

0 comments on commit 25b534f

Please sign in to comment.