mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-12 16:35:49 +01:00
🐛 Fix pull request issues
This commit is contained in:
@@ -38,7 +38,7 @@ export const LocationSelection = ({
|
|||||||
const [query, setQuery] = useState(value.name ?? '');
|
const [query, setQuery] = useState(value.name ?? '');
|
||||||
const [opened, { open, close }] = useDisclosure(false);
|
const [opened, { open, close }] = useDisclosure(false);
|
||||||
const selectionEnabled = query.length > 1;
|
const selectionEnabled = query.length > 1;
|
||||||
const EMPTY_LOCATION = t('form.empty');
|
const emptyLocation = t('form.empty');
|
||||||
|
|
||||||
const onCitySelected = (city: City) => {
|
const onCitySelected = (city: City) => {
|
||||||
close();
|
close();
|
||||||
@@ -89,14 +89,14 @@ export const LocationSelection = ({
|
|||||||
<Group grow>
|
<Group grow>
|
||||||
<NumberInput
|
<NumberInput
|
||||||
value={value.latitude}
|
value={value.latitude}
|
||||||
onChange={(v) => {
|
onChange={(inputValue) => {
|
||||||
if (typeof v !== 'number') return;
|
if (typeof inputValue !== 'number') return;
|
||||||
handleChange(key, {
|
handleChange(key, {
|
||||||
...value,
|
...value,
|
||||||
name: EMPTY_LOCATION,
|
name: emptyLocation,
|
||||||
latitude: v,
|
latitude: inputValue,
|
||||||
});
|
});
|
||||||
setQuery(EMPTY_LOCATION);
|
setQuery(emptyLocation);
|
||||||
}}
|
}}
|
||||||
precision={5}
|
precision={5}
|
||||||
label={t('form.field.latitude')}
|
label={t('form.field.latitude')}
|
||||||
@@ -104,14 +104,14 @@ export const LocationSelection = ({
|
|||||||
/>
|
/>
|
||||||
<NumberInput
|
<NumberInput
|
||||||
value={value.longitude}
|
value={value.longitude}
|
||||||
onChange={(v) => {
|
onChange={(inputValue) => {
|
||||||
if (typeof v !== 'number') return;
|
if (typeof inputValue !== 'number') return;
|
||||||
handleChange(key, {
|
handleChange(key, {
|
||||||
...value,
|
...value,
|
||||||
name: EMPTY_LOCATION,
|
name: emptyLocation,
|
||||||
longitude: v,
|
longitude: inputValue,
|
||||||
});
|
});
|
||||||
setQuery(EMPTY_LOCATION);
|
setQuery(emptyLocation);
|
||||||
}}
|
}}
|
||||||
precision={5}
|
precision={5}
|
||||||
label={t('form.field.longitude')}
|
label={t('form.field.longitude')}
|
||||||
|
|||||||
Reference in New Issue
Block a user