-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat-fe: 사전 질문 필수 입력 필드 표시 #560
Conversation
1724205890.136769 |
1724205892.245359 |
1724205923.216699 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
잘 처리해주셨네요!! 감사감사
if (Object.values(answers).some((answer) => answer.length === 0)) { | ||
if (!window.confirm('작성하지 않은 질문이 있습니다. 제출하시겠습니까?')) { | ||
return; | ||
} | ||
if (isRequiredFieldsIncomplete()) { | ||
return window.alert('모든 필수 항목에 응답해 주세요.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
훨씬 깔끔하네용~
<S.RadioContainer onClick={() => onToggle(!isChecked)}> | ||
<S.HiddenRadio | ||
type="radio" | ||
checked={isChecked} | ||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => onToggle(e.target.checked)} | ||
disabled={isDisabled} | ||
name={name} | ||
required={required} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
input 추가 좋아용~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
변경사항 코드, 화면 모두 확인했습니다. 고생하셨습니다 렛서 🙏
const HiddenRadio = styled.input` | ||
border: 0; | ||
clip: rect(0 0 0 0); | ||
clip-path: inset(50%); | ||
height: 1px; | ||
margin: -1px; | ||
overflow: hidden; | ||
padding: 0; | ||
position: absolute; | ||
white-space: nowrap; | ||
width: 1px; | ||
`; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HiddenRadio 추가 좋네요 👍
const isRequiredFieldsIncomplete = () => | ||
questions.some((question) => question.required && answers[question.questionId]?.length === 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Kim Da Eun <[email protected]>
목적
기능
참고사항
FIX_APP_02
closes #559