fix searchbar error
This commit is contained in:
parent
bf4906b353
commit
20de548763
@ -105,7 +105,7 @@ function setupSearchBar(zipCodeElement: HTMLParagraphElement) {
|
||||
searchBar.onkeypress = (event: KeyboardEvent) => {console.log(event);
|
||||
event.key !== "Enter" || !isNaN(parseInt(event.key));}
|
||||
|
||||
searchBar.onsubmit = async (event: MouseEvent) => {
|
||||
searchBar.addEventListener("submit", async (event: MouseEvent) => {
|
||||
event.preventDefault();
|
||||
|
||||
const inputValue = searchInput.value;
|
||||
@ -122,7 +122,7 @@ function setupSearchBar(zipCodeElement: HTMLParagraphElement) {
|
||||
data.length ? data[0]["navn"] : null,
|
||||
);
|
||||
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
function main() {
|
||||
|
Loading…
Reference in New Issue
Block a user