Ensure datalist hint is cleared
This commit is contained in:
parent
6007e4b96a
commit
89ce5b7d40
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue