Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] 체크박스 선택 안 되는 에러 해결 #416

Merged
merged 1 commit into from
Aug 17, 2024

Conversation

eonseok-jeon
Copy link
Member

Related Issue : Closes #415


🧑‍🎤 Summary

  • 회원가입 체크박스 disabled 처리된 이슈 해결

🧑‍🎤 Comment

만약 <Checkbox>이런 식으로 컴포넌트에 disabled 속성이 없어도

<input
  {...register(name, {
    ...(required && { required: '필수 동의 항목이에요.' }),
    onChange: () => trigger(name),
  })}
  type="checkbox"
  className={`amp-unmask ${hiddenCheckbox}`}
  disabled
  {...checkboxElementProps}
/>

Checkbox 내의 input에 disabled가 설정되어 있어 체크가 막혀버려요

disabled 속성을 추가할 경우
{...checkboxElementProps}에 자동으로 disabled도 포함되기에 지워줬습니다
반대로 <Checkbox> 이렇게만 입력 시 disabled 속성이 없기에 disabled 처리가 되지 않게 돼요

분명 해당 이슈 코리할 때 잡을 수 있었을 텐데 아쉬워요ㅜ
다음부턴 좀 더 신경써서 꼼꼼하게 코리하도록 하겠습니다ㅜㅜ😢

@eonseok-jeon eonseok-jeon linked an issue Aug 17, 2024 that may be closed by this pull request
Copy link

height bot commented Aug 17, 2024

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

Copy link
Member

@lydiacho lydiacho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

헉 저거 checkboxElementProps 있어서 불필요했던 건데, 제가 맨처음에 disabled 처리하면 바로 막히나 테스트해보려고 넣었던 부분인데 삭제를 놓쳤네요 ㅠㅠ

좋습니다!

@eonseok-jeon eonseok-jeon merged commit ebd853d into develop Aug 17, 2024
1 check passed
@eonseok-jeon eonseok-jeon deleted the fix/#415_checkbox-disabled branch August 17, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fix] 체크박스 선택 안 되는 에러 해결
2 participants