Skip to content

Commit

Permalink
feat(sdr): small improvment for #2153 (#2952)
Browse files Browse the repository at this point in the history
* feat(sdr): small improvment for #2153

* fix snaps
  • Loading branch information
Julien Bouquillon authored Aug 28, 2020
1 parent 7be0b75 commit 73c44f7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ function ServiceRenseignement() {
const router = useRouter();
const onDepartmentInput = useCallback(
(keyEvent) => {
const departmentNum = (keyEvent.target.value || "").toLowerCase();
const departmentNum = (
keyEvent.target.value.replace(/^0+/, "") || ""
).toLowerCase();
const departmentData = servicesDeRenseignement[departmentNum];
setDepartementData(departmentData);
},
Expand Down Expand Up @@ -175,8 +177,10 @@ const Pricing = styled.em`
`;

const StyledInput = styled(Input)`
width: 100%;
width: 150px;
margin-top: ${spacings.small};
margin-left: ${spacings.small};
display: inline-block;
`;

const Small = styled.small`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,10 @@ exports[`<ServiceRenseignement /> should render suggestions 1`] = `
}
.c5 {
width: 100%;
width: 150px;
margin-top: 1rem;
margin-left: 1rem;
display: inline-block;
}
.c7 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,10 @@ exports[`<ServiceRenseignementModal /> renders a popup when click on button 1`]
}
.c8 {
width: 100%;
width: 150px;
margin-top: 1rem;
margin-left: 1rem;
display: inline-block;
}
.c10 {
Expand Down

0 comments on commit 73c44f7

Please sign in to comment.