mirror of
https://forge.chapril.org/tykayn/osm-commerces
synced 2025-10-04 17:04:53 +02:00
emoji pour le suivi de thème
This commit is contained in:
parent
7166eb646a
commit
ed9e5b6b47
5 changed files with 101 additions and 21 deletions
|
@ -246,9 +246,16 @@ export function setupCitySearch(inputId, suggestionListId, onSelect) {
|
|||
suggestions.forEach(suggestion => {
|
||||
const item = document.createElement('div');
|
||||
item.classList.add('suggestion-item');
|
||||
item.textContent = suggestion.display_name;
|
||||
// Nouveau rendu : nom en gras, INSEE et CP en petit/gris
|
||||
item.innerHTML = `
|
||||
<span class="suggestion-name">${suggestion.name}</span>
|
||||
<span class="suggestion-details">
|
||||
<span>INSEE : <b>${suggestion.insee}</b></span>
|
||||
<span style="margin-left:8px;">CP : <b>${Array.isArray(suggestion.postcodes) ? suggestion.postcodes.join(', ') : suggestion.postcode}</b></span>
|
||||
</span>
|
||||
`;
|
||||
item.addEventListener('click', () => {
|
||||
searchInput.value = suggestion.display_name;
|
||||
searchInput.value = suggestion.name;
|
||||
clearSuggestions();
|
||||
if (onSelect) {
|
||||
onSelect(suggestion);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue