Skip to content

Commit

Permalink
Merge pull request #240 from boostcampwm2023/hotfix/tag-input
Browse files Browse the repository at this point in the history
[Hotfix] 태그 입력 시 마지막 글자 중복 입력 오류 해결
  • Loading branch information
dmson1218 authored Dec 7, 2023
2 parents 0823dc0 + a3e5624 commit b0d34ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion FE/src/components/DiaryModal/DiaryCreateModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,12 @@ function DiaryCreateModal(props) {
fontSize='1rem'
placeholder='태그를 입력해주세요.'
onBlur={(e) => addTag(e)}
onKeyDown={(e) => {
onKeyPress={(e) => {
if (e.key === "Enter") {
addTag(e);
}
}}
onKeyDown={(e) => {
if (e.key === "Backspace" && e.target.value.length === 0) {
deleteLastTag();
}
Expand Down

0 comments on commit b0d34ab

Please sign in to comment.