Skip to content

Commit

Permalink
🐛 Fix pull request issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Meierschlumpf committed Jun 11, 2023
1 parent c7e0663 commit a8b4494
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/components/Dashboard/Tiles/Widgets/Inputs/LocationSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const LocationSelection = ({
const [query, setQuery] = useState(value.name ?? '');
const [opened, { open, close }] = useDisclosure(false);
const selectionEnabled = query.length > 1;
const EMPTY_LOCATION = t('form.empty');
const emptyLocation = t('form.empty');

const onCitySelected = (city: City) => {
close();
Expand Down Expand Up @@ -89,29 +89,29 @@ export const LocationSelection = ({
<Group grow>
<NumberInput
value={value.latitude}
onChange={(v) => {
if (typeof v !== 'number') return;
onChange={(inputValue) => {
if (typeof inputValue !== 'number') return;
handleChange(key, {
...value,
name: EMPTY_LOCATION,
latitude: v,
name: emptyLocation,
latitude: inputValue,
});
setQuery(EMPTY_LOCATION);
setQuery(emptyLocation);
}}
precision={5}
label={t('form.field.latitude')}
hideControls
/>
<NumberInput
value={value.longitude}
onChange={(v) => {
if (typeof v !== 'number') return;
onChange={(inputValue) => {
if (typeof inputValue !== 'number') return;
handleChange(key, {
...value,
name: EMPTY_LOCATION,
longitude: v,
name: emptyLocation,
longitude: inputValue,
});
setQuery(EMPTY_LOCATION);
setQuery(emptyLocation);
}}
precision={5}
label={t('form.field.longitude')}
Expand Down

0 comments on commit a8b4494

Please sign in to comment.