Class based popup show and hide api

This commit is contained in:
2025-07-06 21:01:04 +02:00
parent 5b7ba0ad69
commit 098addc4e8
6 changed files with 20 additions and 10 deletions

View File

@@ -26,7 +26,7 @@ function createLocationElement(location) {
location_element.addEventListener("click", event => {
window.dataStore.recent_locations.remember(event.target.dataset.locationId);
element_locations_search.locationSelectedCallback(event.target.innerText, event.target.dataset.locationId);
element_locations_search.style.display = "none";
element_locations_search.popupHide();
});
return location_element;
@@ -46,6 +46,6 @@ export function attachLocationsSearch(search_element) {
let el = createLocationElement(location);
element_response.appendChild(el);
}
element_locations_search.style.display = "block";
element_locations_search.popupShow();
});
}