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

[FE] 지출 내역 추가 시 금액에 숫자 외 다른 문자 입력 가능한 버그 수정 #491

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/src/components/StepList/BillStepItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const BillStepItem: React.FC<BillStepItemProps> = ({
<EditableItem.Input
placeholder="0"
type="number"
value={billInput.price || ''}
value={billInput.price ?? null}
Copy link
Contributor

Choose a reason for hiding this comment

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

와 이거 제가 어제 수정하면서 고민했던 건데!
빈 문자열이 아니라 null로 줘도 될것 같은데? 딱 이 생각을 했었거든요..
그런데 일단 빈 문자열로도 잘 동작하길래 슥- 생각만 하고 넘어갔었는데.. 이런 안일함이 버그를 발생시켰다니.. 대-충격;;;

버그 해결해줘서 너무 고마워요 토다리 ㅜㅜ

onChange={e => handleChangeBillInput('price', e)}
style={{textAlign: 'right'}}
></EditableItem.Input>
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/CreateEventPage/SetEventPasswordPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const SetEventPasswordPage = () => {
labelText="비밀번호"
errorText={errorMessage}
value={password}
type="secret"
type="number"
Copy link
Contributor

Choose a reason for hiding this comment

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

혹시 여기 type이 number로 바뀐 이유가 있을까요?

maxLength={RULE.maxEventPasswordLength}
placeholder="비밀번호"
onChange={handleChange}
Expand Down
Loading