Porównaj commity

...

3 Commity

Autor SHA1 Wiadomość Data
Anthony Catel 15271785c7 Places service: only request place location 2023-03-22 14:58:57 +01:00
Anthony Catel 9111c5fc12 Decrease margin 2023-03-22 14:49:11 +01:00
Anthony Catel 6b74e0aa9f Remove searchbox focus when hitting enter 2023-03-22 14:48:59 +01:00
2 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -75,6 +75,8 @@
currentMap.setZoom(17);
reset();
} else {
pacinput.value?.blur()
const sessionToken = new google.maps.places.AutocompleteSessionToken();
const rest = await service.getPlacePredictions({
input: place.name!,
@ -83,7 +85,8 @@
placesService.getDetails({
sessionToken,
placeId: rest.predictions[0].place_id
placeId: rest.predictions[0].place_id,
fields: ['geometry.location']
}, (res) => {
if (!res?.geometry?.location) {
return;
@ -92,6 +95,7 @@
currentMap.setCenter(res.geometry.location);
currentMap.setZoom(17);
reset();
})
}

Wyświetl plik

@ -106,7 +106,7 @@ how to remove the virtical space around the range input in IE*/
.controls {
outline: none;
@apply shadow-md rounded-md h-10 mt-4 border
@apply shadow-md rounded-md h-10 mt-1 border
}
#pac-input {