Skip to content

Commit

Permalink
Merge pull request #64 from Team-return/feature/63-remove-hyphen
Browse files Browse the repository at this point in the history
  • Loading branch information
dnjsdmswl authored Oct 10, 2024
2 parents 1f1faa1 + 3df10f0 commit 5072f04
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/Components/Detail/CompanyDetail/Edit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,23 @@ export function CompanyDetailEdit({
<_.CustomInput
placeholder="팩스번호"
width={100}
type="number"
value={fax ? fax : ''}
type="text"
value={
fax?.replace(/(\d{3})(\d{4})(\d{4})/, '$1-$2-$3') ||
fax ||
''
}
name="fax"
onChange={companyDetailEditInfohandler}
onChange={(e) => {
const onlyNumbers = e.target.value.replace(
/[^0-9]/g,
''
);
setCompanyDetailEditInfo((prev) => ({
...prev,
fax: onlyNumbers,
}));
}}
/>
</_.ContentBox>
</_.Stack>
Expand Down

0 comments on commit 5072f04

Please sign in to comment.