This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
@focus="departure.showResults = departure.results.length > 0"
|
||||
@click.outside="departure.showResults = false"
|
||||
autocomplete="off"
|
||||
placeholder=""
|
||||
placeholder="{{ site.Params.search.placeholderDepart }}"
|
||||
:class="{ 'input-error': errors.departure }"
|
||||
required />
|
||||
<ul class="autocomplete-results" x-show="departure.showResults && departure.results.length > 0" x-cloak>
|
||||
@@ -62,7 +62,7 @@
|
||||
@focus="destination.showResults = destination.results.length > 0"
|
||||
@click.outside="destination.showResults = false"
|
||||
autocomplete="off"
|
||||
placeholder=""
|
||||
placeholder="{{ site.Params.search.placeholderDestination }}"
|
||||
:class="{ 'input-error': errors.destination }"
|
||||
required />
|
||||
<ul class="autocomplete-results" x-show="destination.showResults && destination.results.length > 0" x-cloak>
|
||||
@@ -179,7 +179,7 @@
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await fetch(`https://api-adresse.data.gouv.fr/search/?q=${encodeURIComponent(fieldData.input)}&limit=5`);
|
||||
const response = await fetch(`https://data.geopf.fr/geocodage/search/?q=${encodeURIComponent(fieldData.input)}&limit=5`);
|
||||
const json = await response.json();
|
||||
fieldData.results = json.features || [];
|
||||
fieldData.showResults = fieldData.results.length > 0;
|
||||
|
||||
Reference in New Issue
Block a user