Skip to content

Commit

Permalink
fix: location picker
Browse files Browse the repository at this point in the history
  • Loading branch information
IanKrieger committed Nov 8, 2023
1 parent 86cf735 commit 5af4ff2
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 5af4ff2

Please sign in to comment.