Ensure datalist hint is cleared
All checks were successful
/ build (push) Successful in 1m22s

This commit is contained in:
Simon Bruder 2024-08-06 18:27:30 +02:00
parent cb25a4c29b
commit 9207ff7ec8
Signed by: simon
GPG key ID: 347FF8699CDA0776

View file

@ -16,9 +16,8 @@
const datalistHint = (input, hint) => {
const selected = input.list.querySelector(`option[value="${input.value}"]`);
if (selected === null)
hint.innerText = ""
else {
hint.innerHTML = ""
if (selected !== null) {
const linkPrefix = input.list.dataset.linkPrefix;
if (linkPrefix === undefined) {
hint.innerHTML = selected.innerHTML