Skip to content

Commit

Permalink
[CLD-318] Remove unmapped type (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
duong-se authored Oct 24, 2019
1 parent 494d6bb commit a516b9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ exports[`Select identity should match a snapshot when LOADING false 1`] = `
"label": "Reference",
"value": "RF",
},
Object {
"label": "Unmapped",
"value": "",
},
Object {
"label": "Utility Bill",
"value": "UT",
Expand Down Expand Up @@ -123,10 +119,6 @@ exports[`Select identity should match a snapshot when LOADING true 1`] = `
"label": "Reference",
"value": "RF",
},
Object {
"label": "Unmapped",
"value": "",
},
Object {
"label": "Utility Bill",
"value": "UT",
Expand Down
10 changes: 6 additions & 4 deletions src/components/ui/inputs/select-identity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ export const SelectIdentity: React.FC<SelectIdentityProps> = ({ identityState, .

const listIdentity = React.useMemo(() => {
if (identityTypes) {
return identityTypes.map(item => ({
label: item.value as string,
value: item.id as string
}))
return identityTypes
.filter(item => item.id)
.map(item => ({
label: item.value as string,
value: item.id as string
}))
}
return []
}, [identityTypes])
Expand Down

0 comments on commit a516b9b

Please sign in to comment.