Skip to content

Commit

Permalink
fix: location picker (#969)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanKrieger authored Nov 9, 2023
1 parent 86cf735 commit 14c58db
Show file tree
Hide file tree
Showing 9 changed files with 229 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/Location/LocationPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const checkedIcon = <CheckBoxIcon fontSize="small" />;

export const LocationPicker = () => {
const { data } = useActiveGeocodesQuery();
const sorted = _.sortBy(data?.activeGeocodes?.data ?? [], "name");
const sorted = _.sortBy(data?.activeGeocodes?.data ?? [], "code");
const [formProps, meta, helper] = useField<GeocodeInput[]>("geoTargets");
const errorMessage = meta.error;

Expand All @@ -25,7 +25,7 @@ export const LocationPicker = () => {
options={sorted}
disableCloseOnSelect
autoHighlight
getOptionLabel={(option) => option.name}
getOptionLabel={(option) => option.name ?? option.code}
renderOption={(props, option, { selected }) => (
<li {...props}>
<Checkbox
Expand Down
60 changes: 60 additions & 0 deletions src/graphql/advertiser.generated.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions src/graphql/analytics-overview.generated.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions src/graphql/campaign.generated.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions src/graphql/common.generated.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions src/graphql/creative.generated.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 14c58db

Please sign in to comment.