Ensure datalist hint is cleared
This commit is contained in:
parent
6007e4b96a
commit
89ce5b7d40
|
@ -16,9 +16,8 @@
|
||||||
|
|
||||||
const datalistHint = (input, hint) => {
|
const datalistHint = (input, hint) => {
|
||||||
const selected = input.list.querySelector(`option[value="${input.value}"]`);
|
const selected = input.list.querySelector(`option[value="${input.value}"]`);
|
||||||
if (selected === null)
|
hint.innerHTML = ""
|
||||||
hint.innerText = ""
|
if (selected !== null) {
|
||||||
else {
|
|
||||||
const linkPrefix = input.list.dataset.linkPrefix;
|
const linkPrefix = input.list.dataset.linkPrefix;
|
||||||
if (linkPrefix === undefined) {
|
if (linkPrefix === undefined) {
|
||||||
hint.innerHTML = selected.innerHTML
|
hint.innerHTML = selected.innerHTML
|
||||||
|
|
Loading…
Reference in a new issue