possibilite de selectionner un resultat quand il n'y a rien dans le champ adresse

This commit is contained in:
clemkeirua 2020-01-27 12:42:04 +01:00
parent 35aceeb5e6
commit 9e858ae5ad

View file

@ -122,12 +122,14 @@ const adresseOptions = {
};
},
processResults(data) {
let r = data.features.map(({ properties: { label }, geometry }) => ({
id: label,
text: label,
geometry
}));
r.unshift({ id: data.query, text: data.query });
return {
results: data.features.map(({ properties: { label }, geometry }) => ({
id: label,
text: label,
geometry
}))
results: r
};
}
}