Skip to content

Commit

Permalink
Fix addresses with zip codes not showing predictions
Browse files Browse the repository at this point in the history
  • Loading branch information
canac committed Dec 18, 2024
1 parent 7e667dd commit 4404bd6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ export const StreetAutocomplete: React.FC<StreetAutocompleteProps> = ({
typeof option === 'string' ? option : option.description
}
options={predictions}
// Disable filtering addresses by the input and rely on the Google Maps API to provide
// relevant address predictions
filterOptions={(options) => options}

Check warning on line 174 in src/components/Contacts/ContactDetails/ContactDetailsTab/Mailing/StreetAutocomplete/StreetAutocomplete.tsx

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

StreetAutocomplete:React.FC<StreetAutocompleteProps> already has high cyclomatic complexity, and now it increases in Lines of Code from 120 to 121. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
value={streetValue}
onChange={(_event, newValue) => {
if (typeof newValue === 'string') {
Expand Down

0 comments on commit 4404bd6

Please sign in to comment.