Skip to content

Commit

Permalink
Fix issues with autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
devcshort committed Jan 15, 2024
1 parent c0601ae commit 80e6ae9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/client/components/molecules/LocationAutocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
Select,
ActionIcon,
} from '@mantine/core';
import { useDebouncedValue, useInputState, useToggle } from '@mantine/hooks';
import { useDebouncedValue, useToggle } from '@mantine/hooks';
import { IconLocationFilled, IconMapPin, IconX } from '@tabler/icons-react';
import { RefAttributes, useCallback, useEffect, useRef, useState } from 'react';
import { showNotification } from '@mantine/notifications';
Expand Down Expand Up @@ -60,7 +60,7 @@ export function LocationAutocomplete(props: Props) {
const handleItemSubmit = (e: any) => {
if (hiddenInputRef.current) {
setCookie(null, USER_PREF_COORDS, e.coordinates, { path: '/' });
setCoords(e.coordinates);
setCoords(e.coordinates.join(','));
hiddenInputRef.current.value = e.coordinates;
}
};
Expand Down Expand Up @@ -210,6 +210,7 @@ export function LocationAutocomplete(props: Props) {
}) || ''
}
size="md"
withinPortal
value={value}
name="location"
onChange={handleChange}
Expand Down

0 comments on commit 80e6ae9

Please sign in to comment.